vcl4php-developers Mailing List for VCL for PHP (Page 13)
Brought to you by:
ttm
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
(63) |
May
(29) |
Jun
(135) |
Jul
(36) |
Aug
(15) |
Sep
(30) |
Oct
|
Nov
(6) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
(1) |
Mar
(3) |
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(9) |
Dec
(15) |
2009 |
Jan
(2) |
Feb
(4) |
Mar
(2) |
Apr
|
May
(8) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Jose L. <qa...@gm...> - 2007-05-02 14:23:00
|
Hello, On 4/28/07, Jonathan Benedicto <co...@jo...> wrote: > Why does Page::dumpChildren() output a table that the contents of the page > is rendered in? > > It seems to be used by the XY_LAYOUT, but why doesn't it output the <table> > code instead? Don't understand very well, the page it outputs a table that is the Page itself, with the color, background,etc, properties that are setup for the Page control and inside it dumps the controls it holds using a layout. Please, explain a bit more. Regards |
From: qadram s. <su...@qa...> - 2007-05-02 14:19:36
|
pac...@pa... escribió: > José, okay I had forgotten about the BOM sequence. Not something I usually > think about. Lets say you selected this UTF-8 file format option. (I should > be able to work with UTF-8 documents. In a globalised world I cant afford to > build a stovepipe solution that’s not internationalizable from the start) > The question is then does it affect the forms rendering or component file > parsing in the IDE or not? Because that is my experience: it does. And in > that case it might be a bug. Don't understand very well your message, it must be because I'm not native english speaker, let's see what I can answer. The UTF-8 option must be selected only if you are going to work in DBCS character set, for example, chinese and leave it blank on any other case. > > 1. Or maybe am I not reading this situation correctly. > > If I create a component using the wizard and save it and then install the > component it fails with an error: > > "All components must have a name" EPropertyNotFound error > > If I go and strip out the byte order mark only, then the component renders > fine on the form surface. > > If I leave the byte order mark but remove the trailing hex 00 then I get the > BOM in the property inspector (see enclosed screen shot) but it does render > on the form without messages or exceptions. > > <object class="MSSQLStoredProc" name="MSSQLStoredProc1" > > <property name="Left">225</property> > <property name="Top">133</property> > <property name=""><![CDATA[»¿*Properties]]></property> > <property name="Name">MSSQLStoredProc1</property> > <property name="Params">a:0:{}</property> > </object> If you strip information from the files generated by the IDE, I don't know how it's going to react. > 2. There must be some configuration required in PHP as well: does checking > Tools | Options | Editor >Options | Use UTF-8 not setup PHP for this > capability (is it enable-zend-multibyte??). That explains why the BOM is > being sent to the browser (see an example in which 3 BOM are in a sequence > in attached file. The form is two instances of the above component on a > form) You can select the output charset PHP is going to use and must be UTF-8 if you work in UTF-8 mode. > 3. I noticed that the "xml" files don't mind being set to utf-8 but the > property inspector doesn’t seem to honour utf8 property values if set > outside the IDE. They just get rendered as ?????????? and the utf-8 > characters are overwritten on the next save. XML files are not stored in UTF-8 never, they use CDATA section. We detected a problem in the IDE just after the launch, working in DBCS, the hot fix for this is in the owen and will be released soon. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: Jonathan B. <co...@jo...> - 2007-04-28 18:38:07
|
Why does Page::dumpChildren() output a table that the contents of the page is rendered in? It seems to be used by the XY_LAYOUT, but why doesn't it output the <table> code instead? Jon |
From: <pac...@pa...> - 2007-04-28 11:02:36
|
>That's because you have checked the option to create new units and = forms >The "graphic characters" are called BOM and it's a mark to specify the=20 >file format is in UTF-8, you should only use this mode if you are=20 >working with DBCS characters. Jos=E9, okay I had forgotten about the BOM sequence. Not something I = usually think about. Lets say you selected this UTF-8 file format option. (I = should be able to work with UTF-8 documents. In a globalised world I cant = afford to build a stovepipe solution that=92s not internationalizable from the = start) The question is then does it affect the forms rendering or component = file parsing in the IDE or not? Because that is my experience: it does. And = in that case it might be a bug.=20 1. Or maybe am I not reading this situation correctly. If I create a component using the wizard and save it and then install = the component it fails with an error: "All components must have a name" EPropertyNotFound error If I go and strip out the byte order mark only, then the component = renders fine on the form surface. If I leave the byte order mark but remove the trailing hex 00 then I get = the BOM in the property inspector (see enclosed screen shot) but it does = render on the form without messages or exceptions. <object class=3D"MSSQLStoredProc" name=3D"MSSQLStoredProc1" > <property name=3D"Left">225</property> <property name=3D"Top">133</property> <property = name=3D""><![CDATA[»¿*Properties]]></property> <property name=3D"Name">MSSQLStoredProc1</property> <property name=3D"Params">a:0:{}</property> </object> 2. There must be some configuration required in PHP as well: does = checking Tools | Options | Editor >Options | Use UTF-8 not setup PHP for this capability (is it enable-zend-multibyte??). That explains why the BOM is being sent to the browser (see an example in which 3 BOM are in a = sequence in attached file. The form is two instances of the above component on a form) 3. I noticed that the "xml" files don't mind being set to utf-8 but the property inspector doesn=92t seem to honour utf8 property values if set outside the IDE. They just get rendered as ?????????? and the utf-8 characters are overwritten on the next save.=20 AS you suggest utf-8 is a bit problematic. Cheers, Steve Cooney. |
From: qadram s. <su...@qa...> - 2007-04-28 08:22:45
|
pac...@pa... escribió: > Thanks it now works flawlessly. Your right that it shouldn’t be so fragile. > The form renderer should be ignoring anything beyond ?> shouldn’t it. There is a php script responsible to extract the properties/events/jsevents and more information from the components, you can find it on <delphiforphp>/scripts/getclassinfo.php, that file includes your component class and dumps out that info, so including your file caused those extra lines to be dumped and the IDE interpreted as to empty properties. > Would like to know if you just inspected the file or had to use a debugger.? I checked your component and when I saw the two empty lines I figured out, but because I wrote that code, we need to add extra checking to the IDE to prevent that case. No need for debugger here, but if we put ourselves in your shoes, it's something hard to find, that's why I told you we must prevent that case. >> It would be great to add some kind of "component developer mode" to the >> IDE, so temporary files are shown somewhere. Please, post a QC to >> CodeGear site requesting it. > > Okay I can raise this as a feature request but it might be a lot of work. > Some kind of logging or messaging would be helpful as would be the > intermediate files or It's a matter of setup an extra "component developer window", where to dump information, not too hard, but we have to prioritize work. > But there is a separate issue with files created by the ide or the component > wizard. > It prepends and appends control and graphic characters to the file. > > Create a component and look at the class stub the IDE creates. In a byte > level > editor look at the generated file. > > <?php > //Includes > require_once("vcl/vcl.inc.php"); > use_unit("dbtables.inc.php"); > > //Class definition > class StoredProcEx extends StoredProc ..... > > ?>^@<EOF> > > > The first 3 characters are ASCII 239,187,191. The last one before the EOF > marker is Hex 00. > > I am forever stripping these out. And yes I will raise this as an issue if > someone else > can confirm it (this is x86 Vista). I haven't seen this in the xml > counterparts or project files. That's because you have checked the option Tools | Options | Editor Options | Use UTF-8 to create new units and forms The "graphic characters" are called BOM and it's a mark to specify the file format is in UTF-8, you should only use this mode if you are working with DBCS characters. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: <pac...@pa...> - 2007-04-28 06:14:40
|
>Your code on iframe.inc.php contain to blank lines at the end, with=20 >carriage returns, that makes the IDE think your component has two extra = >properties. That's the source for your your problems. We take note to=20 >make the IDE behave better on that case, but that can lead to problems=20 >on applications using your components, as two extra lines will be = dumped=20 >when including your code and can cause header commands to don't work. Thanks it now works flawlessly. Your right that it shouldn=92t be so = fragile.=20 The form renderer should be ignoring anything beyond ?> shouldn=92t it. Would like to know if you just inspected the file or had to use a = debugger.? > It would be great to add some kind of "component developer mode" to = the=20 > IDE, so temporary files are shown somewhere. Please, post a QC to=20 > CodeGear site requesting it. Okay I can raise this as a feature request but it might be a lot of = work.=20 Some kind of logging or messaging would be helpful as would be the intermediate files or=20 But there is a separate issue with files created by the ide or the = component wizard.=20 It prepends and appends control and graphic characters to the file.=20 Create a component and look at the class stub the IDE creates. In a byte level=20 editor look at the generated file. =EF=BB=BF<?php //Includes require_once("vcl/vcl.inc.php"); use_unit("dbtables.inc.php"); //Class definition class StoredProcEx extends StoredProc ..... ?>^@<EOF> The first 3 characters are ASCII 239,187,191. The last one before the = EOF marker is Hex 00.=20 I am forever stripping these out. And yes I will raise this as an issue = if someone else=20 can confirm it (this is x86 Vista). I haven't seen this in the xml counterparts or project files. |
From: Fawzib R. <f_...@sp...> - 2007-04-26 14:18:57
|
qadram support wrote: > Yes, I know, it's just talk about it, but from my point of view, the > reason to abstract more the widget inheritance will be useful if we plan > to make some kind of *hot-swapping* from a widget framework to another. > That's what I was thinking about, changing frameworks on the fly. > For example, let's say you want to use the ActiveWidgets DBGrid instead > the Qooxdoo one, it would be better to have an ActiveWidgets based > component collection, because there should be features present on the > ActiveWidgets DBGrid, not present on the Qooxdoo DBGrid or viceversa. > Well if I could just change a property and select between Qooxdoo, Yahoo, or Activewidgets it would be much easier than having to rewrite everything to use the QDbGrid, YahooDbGrid or AWDbGrid. Also, the extra properties wouldn't be a problem (I don't think) after all PHP is very dynamic they could be added/removed when you switch frameworks. > Also, because of licensing issues, it would be better to develop a new > component collection for Yahoo controls, it's also useful to have this > separated because of deployment, so you know exactly what to deploy > depending on the control you use. Licensing is not an issue here, I'm not asking about including anything from Yahoo or ActiveWidgets into VCL. We would still have a package for YahooUI or ActiveWidgets but instead of having Button, YahooButton, ActiveWidgetButton and being forced to remake the app with the new components, you would just install the YahooUI package and just change a property in the Button widget. Also I tested the speed with the WebMail sample: Original VCL - between 0.017s - 0.018s Framework Plugin - between 0.019s - 0.020s |
From: qadram s. <su...@qa...> - 2007-04-26 09:26:52
|
Jonathan Benedicto escribió: > qadram support wrote: >> Yes, I think so, would you like to submit a patch or to us to modify >> the affected files? > > Here are the changed files. Added to the repository. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-04-26 09:24:34
|
Fawzib Rojas escribió: > qadram support wrote: >> While it looks good to me, I can't see the point of having such freedom, >> for example, to change the PageControl from using qooxdoo to another >> framework, as there is a lot of code that depend on qooxdoo itself. >> > Well, I think freedom is good. There's some people who like different > frameworks (Yahoo, ActiveWidgets, etc.) Yes, I know, it's just talk about it, but from my point of view, the reason to abstract more the widget inheritance will be useful if we plan to make some kind of *hot-swapping* from a widget framework to another. For example, let's say you want to use the ActiveWidgets DBGrid instead the Qooxdoo one, it would be better to have an ActiveWidgets based component collection, because there should be features present on the ActiveWidgets DBGrid, not present on the Qooxdoo DBGrid or viceversa. >> I supose using this system will not perform as fast as the previous one, >> so I don't know if using this system will get more benefits than >> problems, for example, are we going to allow customers to choose the >> base framework to inherit a PageControl? >> > Well, I don't know how much it would slow things down. All I'm doing is > moving all the javascript/html dump functions to the WidgetPlugin class. >> If the answer is no, I can't see why we have to abstract that as the >> PageControl is an abstraction itself, it would mean to introduce a new >> layer. >> >> > The answer I was thinking was yes. :) > Anyway, I'm just testing things. I have only converted the ListView and > the ProgressBar and the demos run ok. I'll try and make a plugin for > Yahoo UI framework and see how (or if) it works. I'll also see how slow > things get. Also, because of licensing issues, it would be better to develop a new component collection for Yahoo controls, it's also useful to have this separated because of deployment, so you know exactly what to deploy depending on the control you use. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: Fawzib R. <f_...@sp...> - 2007-04-25 20:29:08
|
qadram support wrote: > While it looks good to me, I can't see the point of having such freedom, > for example, to change the PageControl from using qooxdoo to another > framework, as there is a lot of code that depend on qooxdoo itself. > Well, I think freedom is good. There's some people who like different frameworks (Yahoo, ActiveWidgets, etc.) > I supose using this system will not perform as fast as the previous one, > so I don't know if using this system will get more benefits than > problems, for example, are we going to allow customers to choose the > base framework to inherit a PageControl? > Well, I don't know how much it would slow things down. All I'm doing is moving all the javascript/html dump functions to the WidgetPlugin class. > If the answer is no, I can't see why we have to abstract that as the > PageControl is an abstraction itself, it would mean to introduce a new > layer. > > The answer I was thinking was yes. :) Anyway, I'm just testing things. I have only converted the ListView and the ProgressBar and the demos run ok. I'll try and make a plugin for Yahoo UI framework and see how (or if) it works. I'll also see how slow things get. |
From: Jairo V. J. <jai...@li...> - 2007-04-25 19:52:05
|
Hi!=20 I wrote some code in dbtables.inc.php regarding execution of = non-fetchable stored procedures. I've implemented the Oracle-like syntax = and mysql syntax remains pending.=20 I've tried to submit patches on sourceforge like Jos=E9 explained, but I = do not succeeded. Maybe 'cause I'm not a registered developer on the = project.=20 What can be done? Jairo Viana Jr. IT Developer www.lideraviacao.com.br |
From: Jonathan B. <co...@jo...> - 2007-04-25 19:34:39
|
qadram support wrote: > Yes, I think so, would you like to submit a patch or to us to modify the > affected files? Here are the changed files. Jon |
From: Jonathan B. <co...@jo...> - 2007-04-25 19:00:35
|
qadram support wrote: > Yes, I think so, would you like to submit a patch or to us to modify the > affected files? I can submit the patch. Will do it ASAP. Thanks, Jon |
From: Jonathan B. <co...@jo...> - 2007-04-25 18:59:56
|
qadram support wrote: > Let me know if you are ok with it or do you have other ideas before I > start coding. No I don't have any other ideas - sounds great to me. :-) Jon |
From: qadram s. <su...@qa...> - 2007-04-25 16:59:17
|
Jonathan Benedicto escribió: > Yes, that looks good. Do you think that this one might be simpler, and > easier to understand? > > if( $v->Visible && !$v->IsLayer ) > { > if( $this->_control->methodExists('getActiveLayer') ) > { > $dump = ( (string)$v->Layer == > (string)$this->_control->Activelayer ); > } > else > { > $dump = true; > } > } Yes, I think so, would you like to submit a patch or to us to modify the affected files? Patches can be also submitted using the SourceForge tracker: http://sourceforge.net/tracker/?group_id=189419&atid=929252 Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-04-25 16:55:46
|
Jonathan Benedicto escribió: > qadram support wrote: >> My idea is something like this: >> >> echo $this->Button1->ajaxCall("Button1Click",array('Label1','Button1'); > > [snip] > >> So the key here would be to allow you specify which components you want >> to get updated by the Ajax Call, reducing the overhead. >> >> By sending the names of the components to want to get updated, Ajax >> calls can filter out components to regenerate and update. > > I like this method of filtering that you've come up with :-) Very simple. Let me know if you are ok with it or do you have other ideas before I start coding. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-04-25 16:55:00
|
Fawzib Rojas escribió: > qadram support wrote: >> There is abstraction for that on DWidget for Dynapi and in QWidget for >> Qooxdoo, if you want to abstract more, feel free to submit patches for them. >> > Well the changes I made work, I removed the QWidget and DWidget controls > and now there's only Widget which looks like this: > > class Widget extends FocusControl > { > function dumpHeaderCode() > { > } > > function dumpContents() > { > // use WidgetPlugin > // Added by FRR > $params=array(); > $this->WidgetPlugin->dumpContentsTop($this,$params); > $this->WidgetPlugin->dumpContents($this,$params); > $this->WidgetPlugin->dumpContentsBottom($this,$params); > } > > function __construct($aowner=null) > { > //Calls inherited constructor > parent::__construct($aowner); > } > } > > Also I converted the ProgressBar and CustomListView to use the Widget > class, for example CustomListView looks like this: > > class CustomListView extends Widget > { > protected $_columns=array(); > protected $_items=array(); > > function dumpContents() > { > $this->WidgetPlugin->dumpContentsTop($this,array()); > > $columns = array(); > while (list(, $column) = each($this->_columns)) > { > if (array_key_exists('Items', $item)) $title = > $item['Title']; > else $title = ""; > > $columns[] = "\"$title\""; > } > $params=array(); > $params["columns"] = array("\"M\"", "\"A\"", > "\"Subject\"", "\"From\"", "\"Date\""); > > > $this->WidgetPlugin->dumpWidgetTop($this,"LIST_VIEW",$params); > $this->WidgetPlugin->dumpWidget($this,"LIST_VIEW",$params); > > $this->WidgetPlugin->dumpWidgetBottom($this,"LIST_VIEW",$params); > > $this->WidgetPlugin->setCursor($this, > array("cursor"=>$this->Cursor)); > > $this->WidgetPlugin->dumpContentsBottom($this,array()); > } > > function __construct($aowner=null) > { > //Calls inherited constructor > parent::__construct($aowner); > $this->writeWidgetPluginName("QOOXDOO"); > $this->WidgetPlugin->setControlStyles($this); > $this->Width=557; > $this->Height=314; > } > <snip> > } > > That seems cleaner and every control descends from one class Widget, all > you need to do is create a new plugin for each framework and there is > nothing hardcoded in the components. If you want to change to a new > framework just create a plugin for it and change the > $this->writeWidgetPluginName("QOOXDOO") to > $this->writeWidgetPluginName("MY NEW FRAMEWORK"). The plugin does all > the actual writing of the javascript code. In theory even the HTML > components could be created the same way. > > Any comments? Recommendations? While it looks good to me, I can't see the point of having such freedom, for example, to change the PageControl from using qooxdoo to another framework, as there is a lot of code that depend on qooxdoo itself. I supose using this system will not perform as fast as the previous one, so I don't know if using this system will get more benefits than problems, for example, are we going to allow customers to choose the base framework to inherit a PageControl? If the answer is no, I can't see why we have to abstract that as the PageControl is an abstraction itself, it would mean to introduce a new layer. Let's comment about it. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-04-25 16:49:07
|
nts...@ao... escribió: > Gurus. > > I need a little help in regards to using the Delphi 4 PHP > DateTimePicker VCL. > > I have an application where any page that does not have the > DateTimePicker will return the servers local date / time when I use > $TodayDate = date("Y-m-d H:i:s"); > > Then I have pages where I am using DateTimePicker and now the > $TodayDate = date("Y-m-d H:i:s"); returns the UTC time even if I have > try to change the TimeZone property to America/Los_Angeles. > > I do not have a problem with that DataTimePicker VCL does not > understand the TimeZone part but it seam strange to me that it changes > the result of $TodayDate = date("Y-m-d H:i:s"); > > To fix the issue I use > date_default_timezone_set("America/Los_Angeles"); in the Before Show > Event. > > One could conclude that the DateTimePicker VCL is having a TimeZone bug. > > As always any and all inputs are welcome. When you create a DateTimePicker, the value for it is set to the current time in UTC zone, as that is the default zone, changing timezone is not useful is the Value property has preference over it. The solution for your problem is to set the Value property to the right date/time you need without using TimeZone property. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-04-25 16:47:11
|
pac...@pa... escribió: > Okay, > > I have attempted to create a component InlineFrame which is descended from > Scrolling Control but which encapsulates an iframe html component instead. I > wanted initially to use Frame itself but the Page class code specifically > looks for components that inherit from Frame and generates unwanted frameset > code. Yes, Page containing Frames it becomes a Frameset. > I can install the component fine and I can create a test harness and > programmatically create an instance of the class successfully at runtime, > but i cannot properly render the control on the form at design-time. Well it > is usable just. However it is unreliable at setting properties and will not > generate code for the tag editor. If you use Shift+Ctrl+F12 it generates a > message > > "Line 140", "C:\Users\Administrator\Documents\Documents\Delphi for PHP > Projects\~D87D.php "parse error, unexpected')', Expecting T_STRING or > T_VARIABLE or '{' or '$'" The file name is session related. Your code on iframe.inc.php contain to blank lines at the end, with carriage returns, that makes the IDE think your component has two extra properties. That's the source for your your problems. We take note to make the IDE behave better on that case, but that can lead to problems on applications using your components, as two extra lines will be dumped when including your code and can cause header commands to don't work. > Also before you set the source property there should be a default message > "Fill Source property with the URL you want to show on this Inline Frame" in > an html table but this is never rendered. Just a transparent control. > > As I mentioned property setting is erratic. For some reason the xml > persistence has two unset properties, the "name" attribute is unpopulated. > > <object class="InlineFrame" name="iframeTest" > > <property name=""></property> > <property name=""></property> > <property name="Align">alTop</property> > <property name="Cursor">crDefault</property> > <property name="Height">351</property> > <property name="Hint">hint</property> > <property name="Left">1</property> > <property name="MarginHeight">3</property> > <property name="MarginWidth">3</property> > <property name="Name">iframeTest</property> > <property name="Source">http://www.qadram.com/vcl4php/</property> > <property name="Top">1</property> > <property name="Width">798</property> > <property name="OnAfterShow"></property> > <property name="OnBeforeShow"></property> > <property name="OnShow"></property> > </object> > > There is a additional flicker and redrawing of the property sheet in the IDE > as well. > > To penetrate this further I would possibly need to have a debugging session > over the IDE itself. But if anyone has any bright ideas I would appreciate > it. It would be great to add some kind of "component developer mode" to the IDE, so temporary files are shown somewhere. Please, post a QC to CodeGear site requesting it. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: <pac...@pa...> - 2007-04-22 13:00:42
|
Okay, I have attempted to create a component InlineFrame which is descended from Scrolling Control but which encapsulates an iframe html component instead. I wanted initially to use Frame itself but the Page class code specifically looks for components that inherit from Frame and generates unwanted frameset code. I can install the component fine and I can create a test harness and programmatically create an instance of the class successfully at runtime, but i cannot properly render the control on the form at design-time. Well it is usable just. However it is unreliable at setting properties and will not generate code for the tag editor. If you use Shift+Ctrl+F12 it generates a message "Line 140", "C:\Users\Administrator\Documents\Documents\Delphi for PHP Projects\~D87D.php "parse error, unexpected')', Expecting T_STRING or T_VARIABLE or '{' or '$'" The file name is session related. Also before you set the source property there should be a default message "Fill Source property with the URL you want to show on this Inline Frame" in an html table but this is never rendered. Just a transparent control. As I mentioned property setting is erratic. For some reason the xml persistence has two unset properties, the "name" attribute is unpopulated. <object class="InlineFrame" name="iframeTest" > <property name=""></property> <property name=""></property> <property name="Align">alTop</property> <property name="Cursor">crDefault</property> <property name="Height">351</property> <property name="Hint">hint</property> <property name="Left">1</property> <property name="MarginHeight">3</property> <property name="MarginWidth">3</property> <property name="Name">iframeTest</property> <property name="Source">http://www.qadram.com/vcl4php/</property> <property name="Top">1</property> <property name="Width">798</property> <property name="OnAfterShow"></property> <property name="OnBeforeShow"></property> <property name="OnShow"></property> </object> There is a additional flicker and redrawing of the property sheet in the IDE as well. To penetrate this further I would possibly need to have a debugging session over the IDE itself. But if anyone has any bright ideas I would appreciate it. I have attached all the files: the components (need to go in vcl\softwaremage), the test harness for programmatic instantiation of the class (test_iframe) and a form with the component on it (testform) and the corresponding xml file. Cheers, Steve Cooney. |
From: <nts...@ao...> - 2007-04-21 18:07:06
|
Gurus. I need a little help in regards to using the Delphi 4 PHP DateTimePicker VCL. I have an application where any page that does not have the DateTimePicker will return the servers local date / time when I use $TodayDate = date("Y-m-d H:i:s"); Then I have pages where I am using DateTimePicker and now the $TodayDate = date("Y-m-d H:i:s"); returns the UTC time even if I have try to change the TimeZone property to America/Los_Angeles. I do not have a problem with that DataTimePicker VCL does not understand the TimeZone part but it seam strange to me that it changes the result of $TodayDate = date("Y-m-d H:i:s"); To fix the issue I use date_default_timezone_set("America/Los_Angeles"); in the Before Show Event. One could conclude that the DateTimePicker VCL is having a TimeZone bug. As always any and all inputs are welcome. Bjarne \v/ Coordinate your email-newsletters with NTS eBlast tool suite http://www.go2nts.com/eblast ________________________________________________________________________ AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com. |
From: Fawzib R. <f_...@sp...> - 2007-04-20 21:06:07
|
qadram support wrote: > There is abstraction for that on DWidget for Dynapi and in QWidget for > Qooxdoo, if you want to abstract more, feel free to submit patches for them. > Well the changes I made work, I removed the QWidget and DWidget controls and now there's only Widget which looks like this: class Widget extends FocusControl { function dumpHeaderCode() { } function dumpContents() { // use WidgetPlugin // Added by FRR $params=array(); $this->WidgetPlugin->dumpContentsTop($this,$params); $this->WidgetPlugin->dumpContents($this,$params); $this->WidgetPlugin->dumpContentsBottom($this,$params); } function __construct($aowner=null) { //Calls inherited constructor parent::__construct($aowner); } } Also I converted the ProgressBar and CustomListView to use the Widget class, for example CustomListView looks like this: class CustomListView extends Widget { protected $_columns=array(); protected $_items=array(); function dumpContents() { $this->WidgetPlugin->dumpContentsTop($this,array()); $columns = array(); while (list(, $column) = each($this->_columns)) { if (array_key_exists('Items', $item)) $title = $item['Title']; else $title = ""; $columns[] = "\"$title\""; } $params=array(); $params["columns"] = array("\"M\"", "\"A\"", "\"Subject\"", "\"From\"", "\"Date\""); $this->WidgetPlugin->dumpWidgetTop($this,"LIST_VIEW",$params); $this->WidgetPlugin->dumpWidget($this,"LIST_VIEW",$params); $this->WidgetPlugin->dumpWidgetBottom($this,"LIST_VIEW",$params); $this->WidgetPlugin->setCursor($this, array("cursor"=>$this->Cursor)); $this->WidgetPlugin->dumpContentsBottom($this,array()); } function __construct($aowner=null) { //Calls inherited constructor parent::__construct($aowner); $this->writeWidgetPluginName("QOOXDOO"); $this->WidgetPlugin->setControlStyles($this); $this->Width=557; $this->Height=314; } <snip> } That seems cleaner and every control descends from one class Widget, all you need to do is create a new plugin for each framework and there is nothing hardcoded in the components. If you want to change to a new framework just create a plugin for it and change the $this->writeWidgetPluginName("QOOXDOO") to $this->writeWidgetPluginName("MY NEW FRAMEWORK"). The plugin does all the actual writing of the javascript code. In theory even the HTML components could be created the same way. Any comments? Recommendations? > GraphicMainMenu was not finished and not integrated in the VCL for PHP > for shipping. > > Regards > Ok, Thanks . |
From: Jonathan B. <co...@jo...> - 2007-04-20 13:46:44
|
qadram support wrote: > My idea is something like this: > > echo $this->Button1->ajaxCall("Button1Click",array('Label1','Button1'); [snip] > So the key here would be to allow you specify which components you want > to get updated by the Ajax Call, reducing the overhead. > > By sending the names of the components to want to get updated, Ajax > calls can filter out components to regenerate and update. I like this method of filtering that you've come up with :-) Very simple. Jon |
From: Jonathan B. <co...@jo...> - 2007-04-20 13:43:40
|
qadram support wrote: >> - Line 889: Fix for the echo "<!-- $this->name begin -->\n"; blocking the >> DOCTYPE from working. SF bug 1701831. > Added Thanks. > Let's comment on this one: [snip] > 1.IsLayer property makes the Panel to become an HTML layer to be > floating and hidden to be used later from javascript, so a control with > IsLayer set must never be dumped. > > 2.The logic for dumping a control must be: > > -If the parent component has ActiveLayer property, must check: > Layer==Parent::ActiveLayer and Visible==true > > -If parent component has not ActiveLayer property, must check: > Visible==true > > So I will rewrite this as follows: > > if (($v->Visible) && (!$v->IsLayer) && > (($this->_control->methodExists('getActiveLayer')) && > (string)$v->Layer==(string)$this->_control->Activelayer)) $dump=true; > > if (($v->Visible) && (!$v->IsLayer) && > ((!$this->_control->methodExists('getActiveLayer')) $dump=true; > > Removing the else and checking both cases. Let me know if it's OK and > will modify this and smarty. Yes, that looks good. Do you think that this one might be simpler, and easier to understand? if( $v->Visible && !$v->IsLayer ) { if( $this->_control->methodExists('getActiveLayer') ) { $dump = ( (string)$v->Layer == (string)$this->_control->Activelayer ); } else { $dump = true; } } > Yes, it's OK this way, or you can submit unified diff, whatever you like. Ok, thanks. Jon |
From: qadram s. <su...@qa...> - 2007-04-20 11:57:18
|
Jonathan Benedicto escribió: > José León wrote: >> I'm OK with that change, we should also make some changes on that: > > Ok, shall I go ahead and modify it, then post the changes here? Sure >> -Provide a way when using ajaxCall to specify the components to get >> updated automatically (right now all components are updated) > > To do this, components could simply return from the dumpForAjax method if > they didn't need to update. Wouldn't this be the best approach, or did you > have something else in mind? My idea is something like this: echo $this->Button1->ajaxCall("Button1Click",array('Label1','Button1'); What right now is happening behind the scenes is: -Ajax call is performed -PHP routine is executed -*Every* component is generated and added to the ajax response So the key here would be to allow you specify which components you want to get updated by the Ajax Call, reducing the overhead. By sending the names of the components to want to get updated, Ajax calls can filter out components to regenerate and update. Regarding dumpForAjax, it's a method to be overriden by components that need special treatment to optimize its update, if not implemented by a component, the Ajax engine creates a new object in the browser, instead of updating it, so in this method you can write all the javascript code to update the component without creating a new one. Let's see the DBGrid implementation. HTML only components doesn't need to implement this method, as the HTML inside is replaced without problems, only needed when the component is javascript (i.e. Qooxdoo) >> -Modify controls, like PageControl to use the dumpForAjax so they don't >> get destroyed and created again when calling ajax. > > Yeah, this one needs it ;-) Yes, that is the perfect example on why dumpForAjax is required, the component gets created again, so there is flicker. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |