vcl4php-developers Mailing List for VCL for PHP (Page 8)
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: Rob W. <rob...@gm...> - 2007-06-24 22:56:01
|
As a temporary solution, check out this patch. It just disables the bad functionality. I'm not sure if there's another convenient way for an end-user (programmer) to get the field data, but they still show up in the dbgrid that is displayed in the sample app we were using in this problem so the data is still there. I know Jose won't like the "just disable it" mentality, but this functionality is just poorly planned. -Rob On 6/23/07, Jonathan Benedicto <co...@jo...> wrote: > Aha, I get the same error. It used to be different, but I think your patch > changed it. > > Interesting. Looking forward to hearing more details on your investigation > :-) > > Jon > > ----- Original Message ----- > From: "Rob Wilkens" <rob...@gm...> > To: <vcl...@li...> > Sent: Saturday, June 23, 2007 11:07 PM > Subject: Re: [vcl4php-developers] problem with Name fields > > > > Not sure if it's batch patch, but with my latest (I think the "June14" > > patch) it worked for me. I'm not 100% sure that for what I did my > > patch would have had an effect until I submitted the button, and when > > I submitted the button I got a new error (see below). > > > > Here's my sample screenshot to illustrate, with actual data (I blacked > > out the names from the screeshot). > > > > Please take a look and tell me if I did something differently than > > you. I do have a "Name" field here, it was pre-existing prior to my > > Delphi for PHP days. > > > > Note: If I click to filter, I get the following error, possibly > > because I didn't set up the filter for my dataset: > > > > Fatal error: Call to undefined method stdClass::Prepare() in > > C:\Program Files\CodeGear\Delphi for > > PHP\1.0\vcl-orig-modbyrob\samples\Data Aware\query\querysample.php on > > line 37 > > > > I haven't had the time to debug this error... I'm going to sleep > > (it's late here). > > > > Have a good night and good luck! > > > > -Rob > > > > On 6/23/07, Jonathan Benedicto <co...@jo...> wrote: > > > Hi Rob, > > > > > > Trying to locate your patch, is it the "BatchPatch.patch" file that > alters > > > classes.inc.php, stdctrls.inc.php and forms.inc.php? If it is, I think I > > > applied it correctly, but it doesn't solve the problem. > > > > > > I've just run into this problem again, this time with fields called > "State". > > > I'm beginning to wonder whether the VCL For PHP's design, where you can > use > > > the field name as the properties of the DataSet-derived components, is > > > sound. The VCL For Win32 uses FieldByName, which, IMO, is a safer and > less > > > bug-prone design. > > > > > > Jon > > > > > > ----- Original Message ----- > > > From: "Rob Wilkens" <rob...@gm...> > > > To: <vcl...@li...> > > > Sent: Friday, June 22, 2007 8:01 PM > > > Subject: Re: [vcl4php-developers] problem with Name fields > > > > > > > > > > Whenever you get around to it, please post your resuilts here > > > > (positive or negative). It might help the process along if we know > > > > we're dealing with the same problem and the patch does fix it. I > > > > believe it should. > > > > > > > > I'm a little concerned that the last I heard from Jose was when i > > > > replied to a private message of his on the list after he asked me to > > > > not e-mail him privately again. Perhaps I violated his privacy by > > > > doing that, I guess, and maybe he's offended, in which case -- If > > > > you're reading Jose, I'm sorry for doing that if it bothered you. I > > > > didn't mean to be rude. > > > > > > > > -Rob > > > > > > > > On 6/22/07, Jonathan Benedicto <co...@jo...> wrote: > > > >> Hi Rob, > > > >> > > > >> No, I didn't apply the patch - I'll try it and see if it fixes it. > > > >> > > > >> Jose has been rather quiet lately, hope he's ok. > > > >> > > > >> Jon > > > >> > > > >> ----- Original Message ----- > > > >> From: "Rob Wilkens" <rob...@gm...> > > > >> To: <vcl...@li...> > > > >> Sent: Thursday, June 21, 2007 1:24 PM > > > >> Subject: Re: [vcl4php-developers] problem with Name fields > > > >> > > > >> > > > >> > Actually, did you apply the patch (not officially accepted) I sent > in > > > >> > most recently. > > > >> > > > > >> > That was the same kind of stack trace I was getting whenever I > loaded > > > >> > a page a second time in my app (i.e. after a button submission). > The > > > >> > problem occured because I was dynamically creating components that > > > >> > weren't in the xml file. > > > >> > > > > >> > It's related to storing things in the session, and I think my > solution > > > >> > solves the problem succesfully and hopefully makes Jose happy so he > > > >> > includes it. I haven't heard from Jose on the list in about a week > > > >> > now. > > > >> > > > > >> > -Rob > > > >> > > > > >> > On 6/21/07, Jonathan Benedicto <co...@jo...> wrote: > > > >> >> Hi All, > > > >> >> > > > >> >> Just run into a problem with the VCL and tables containing a field > > > >> >> called > > > >> >> Name. > > > >> >> > > > >> >> If a table contains a field called "Name", when the page is > serialized > > > >> >> into > > > >> >> the PHP session, the table's Name field value is used to write out > the > > > >> >> name > > > >> >> of the component to the serialized stream. > > > >> >> > > > >> >> To see this problem in action, open the QuerySample in the > > > >> >> vcl\samples\DataAware\query, and set it to use a table that has a > Name > > > >> >> field. Run the example, and hit the button. You should get a > message: > > > >> >> > > > >> >> Application raised an exception class EPropertyNotFound with > message > > > >> >> 'Error > > > >> >> using a property, not defined as a member [QuerySample.Ships]' > > > >> >> Callstack #0 File: C:\Users\Jonathan\Downloads\querysample.php > Line: > > > >> >> 53 > > > >> >> |_Callstack #1 File: C:\Program Files (x86)\CodeGear\Delphi for > > > >> >> PHP\1.0\vcl\classes.inc.php Line: 1380 > > > >> >> |_Callstack #2 File: C:\Program Files (x86)\CodeGear\Delphi for > > > >> >> PHP\1.0\vcl\classes.inc.php Line: 1415 > > > >> >> > > > >> >> Jon > > > >> >> > > > >> >> > > > >> > >> ------------------------------------------------------------------------- > > > >> >> This SF.net email is sponsored by DB2 Express > > > >> >> Download DB2 Express C - the FREE version of DB2 express and take > > > >> >> control of your XML. No limits. Just data. Click to get it now. > > > >> >> http://sourceforge.net/powerbar/db2/ > > > >> >> _______________________________________________ > > > >> >> vcl4php-developers mailing list > > > >> >> vcl...@li... > > > >> >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > >> >> > > > >> > > > > >> > > > > >> > -- > > > >> > Rob Wilkens > > > >> > http://RobWilkens.com > > > >> > 516-874-0579 > > > >> > > > > >> > > ------------------------------------------------------------------------- > > > >> > This SF.net email is sponsored by DB2 Express > > > >> > Download DB2 Express C - the FREE version of DB2 express and take > > > >> > control of your XML. No limits. Just data. Click to get it now. > > > >> > http://sourceforge.net/powerbar/db2/ > > > >> > _______________________________________________ > > > >> > vcl4php-developers mailing list > > > >> > vcl...@li... > > > >> > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > >> > > > > >> > > > >> > > > > >> ------------------------------------------------------------------------- > > > >> This SF.net email is sponsored by DB2 Express > > > >> Download DB2 Express C - the FREE version of DB2 express and take > > > >> control of your XML. No limits. Just data. Click to get it now. > > > >> http://sourceforge.net/powerbar/db2/ > > > >> _______________________________________________ > > > >> vcl4php-developers mailing list > > > >> vcl...@li... > > > >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > >> > > > > > > > > > > > > -- > > > > Rob Wilkens > > > > http://RobWilkens.com > > > > 516-874-0579 > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by DB2 Express > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > control of your XML. No limits. Just data. Click to get it now. > > > > http://sourceforge.net/powerbar/db2/ > > > > _______________________________________________ > > > > vcl4php-developers mailing list > > > > vcl...@li... > > > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > _______________________________________________ > > > vcl4php-developers mailing list > > > vcl...@li... > > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > > > > > -- > > Rob Wilkens > > http://RobWilkens.com > > 516-874-0579 > > > > > ---------------------------------------------------------------------------- > ---- > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > > ---------------------------------------------------------------------------- > ---- > > > > _______________________________________________ > > vcl4php-developers mailing list > > vcl...@li... > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > vcl4php-developers mailing list > vcl...@li... > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > -- Rob Wilkens http://RobWilkens.com 516-874-0579 |
From: Rob W. <rob...@gm...> - 2007-06-24 13:34:39
|
First, a comment that a short-term fix might be disabling the storing of xml data in the session and retrieving it, as my first fix on this issue did. This is not a long-term or proper fix, though. Also.... ============================================================ Some minor clarifications below. On 6/24/07, Rob Wilkens <rob...@gm...> wrote: > Ok, Here's the issue: > > From __get in dbtables.php: > > if ($this->State==dsBrowse) > { > return ($this->_rs->fields[$nm]); > } > > What happens: > When you retrieve $query1->Name and in browse mode, instead of > returning the name of the property, the above code will return the > value of the field. Actually, make that "..instead of returning the VALUE of the Name property.." > So, When it goes to store this information in the session, the name it > stores in the session (the value it does the __get on) is the value of > the last field it had with that name. In my case, for example, it Make that "...the value of the last field named name..." > might store the name as "[Contact List]" which certainly confuses > matters. Make that "...might retrieve the name as.....". > Put another way: The way it works now is dumb. > > We need to work on changing this, but I won't do it myself. Or > rather, i'll do the work myself, but someone needs to tell me this > much: Can we create a new function called 'getFieldValue($name)' > which will get the field value (like __get is doing now) and take out > the 'get value as property' dumbness. > > I don't want to do this without input from others, so speak up! > > -Rob |
From: Rob W. <rob...@gm...> - 2007-06-24 13:24:49
|
Ok, Here's the issue: >From __get in dbtables.php: if ($this->State==dsBrowse) { return ($this->_rs->fields[$nm]); } What happens: When you retrieve $query1->Name and in browse mode, instead of returning the name of the property, the above code will return the value of the field. So, When it goes to store this information in the session, the name it stores in the session (the value it does the __get on) is the value of the last field it had with that name. In my case, for example, it might store the name as "[Contact List]" which certainly confuses matters. Put another way: The way it works now is dumb. We need to work on changing this, but I won't do it myself. Or rather, i'll do the work myself, but someone needs to tell me this much: Can we create a new function called 'getFieldValue($name)' which will get the field value (like __get is doing now) and take out the 'get value as property' dumbness. I don't want to do this without input from others, so speak up! -Rob On 6/24/07, Rob Wilkens <rob...@gm...> wrote: > Update: > > I was wrong, upon further investigation. > > Somehow $Query1->Name is being set to the Name field in the databases' > last value. > > This looks bad, but is probably fix-able. I'm continuuing to investigate. > > -Rob > > On 6/24/07, Rob Wilkens <rob...@gm...> wrote: > > Yes, I checked (couldn't sleep after I got your mail) and my patch > > apparently does fix your first error.... > > > > This second error seems more interesting.. I may find the source tonight. > > > > What I learned so far: > > -On first page load (which is how I know it's disconnected from my > > fix), Query1 is of type 'stdClass' as opposed to type Query. > > -It doesn't have any properties other than the ones assigned to it in > > source (the property editors settings don't get attached to it). > > > > Put another way, the xml file settings for Query1 don't "take". > > > > I don't know if this is a new problem (I imagine it is). > > > > -Rob > > > > On 6/23/07, Jonathan Benedicto <co...@jo...> wrote: > > > Aha, I get the same error. It used to be different, but I think your patch > > > changed it. > > > > > > Interesting. Looking forward to hearing more details on your investigation > > > :-) > > > > > > Jon > > > > > > ----- Original Message ----- > > > From: "Rob Wilkens" <rob...@gm...> > > > To: <vcl...@li...> > > > Sent: Saturday, June 23, 2007 11:07 PM > > > Subject: Re: [vcl4php-developers] problem with Name fields > > > > > > > > > > Not sure if it's batch patch, but with my latest (I think the "June14" > > > > patch) it worked for me. I'm not 100% sure that for what I did my > > > > patch would have had an effect until I submitted the button, and when > > > > I submitted the button I got a new error (see below). > > > > > > > > Here's my sample screenshot to illustrate, with actual data (I blacked > > > > out the names from the screeshot). > > > > > > > > Please take a look and tell me if I did something differently than > > > > you. I do have a "Name" field here, it was pre-existing prior to my > > > > Delphi for PHP days. > > > > > > > > Note: If I click to filter, I get the following error, possibly > > > > because I didn't set up the filter for my dataset: > > > > > > > > Fatal error: Call to undefined method stdClass::Prepare() in > > > > C:\Program Files\CodeGear\Delphi for > > > > PHP\1.0\vcl-orig-modbyrob\samples\Data Aware\query\querysample.php on > > > > line 37 > > > > > > > > I haven't had the time to debug this error... I'm going to sleep > > > > (it's late here). > > > > > > > > Have a good night and good luck! > > > > > > > > -Rob > > > > > > > > On 6/23/07, Jonathan Benedicto <co...@jo...> wrote: > > > > > Hi Rob, > > > > > > > > > > Trying to locate your patch, is it the "BatchPatch.patch" file that > > > alters > > > > > classes.inc.php, stdctrls.inc.php and forms.inc.php? If it is, I think I > > > > > applied it correctly, but it doesn't solve the problem. > > > > > > > > > > I've just run into this problem again, this time with fields called > > > "State". > > > > > I'm beginning to wonder whether the VCL For PHP's design, where you can > > > use > > > > > the field name as the properties of the DataSet-derived components, is > > > > > sound. The VCL For Win32 uses FieldByName, which, IMO, is a safer and > > > less > > > > > bug-prone design. > > > > > > > > > > Jon > > > > > > > > > > ----- Original Message ----- > > > > > From: "Rob Wilkens" <rob...@gm...> > > > > > To: <vcl...@li...> > > > > > Sent: Friday, June 22, 2007 8:01 PM > > > > > Subject: Re: [vcl4php-developers] problem with Name fields > > > > > > > > > > > > > > > > Whenever you get around to it, please post your resuilts here > > > > > > (positive or negative). It might help the process along if we know > > > > > > we're dealing with the same problem and the patch does fix it. I > > > > > > believe it should. > > > > > > > > > > > > I'm a little concerned that the last I heard from Jose was when i > > > > > > replied to a private message of his on the list after he asked me to > > > > > > not e-mail him privately again. Perhaps I violated his privacy by > > > > > > doing that, I guess, and maybe he's offended, in which case -- If > > > > > > you're reading Jose, I'm sorry for doing that if it bothered you. I > > > > > > didn't mean to be rude. > > > > > > > > > > > > -Rob > > > > > > > > > > > > On 6/22/07, Jonathan Benedicto <co...@jo...> wrote: > > > > > >> Hi Rob, > > > > > >> > > > > > >> No, I didn't apply the patch - I'll try it and see if it fixes it. > > > > > >> > > > > > >> Jose has been rather quiet lately, hope he's ok. > > > > > >> > > > > > >> Jon > > > > > >> > > > > > >> ----- Original Message ----- > > > > > >> From: "Rob Wilkens" <rob...@gm...> > > > > > >> To: <vcl...@li...> > > > > > >> Sent: Thursday, June 21, 2007 1:24 PM > > > > > >> Subject: Re: [vcl4php-developers] problem with Name fields > > > > > >> > > > > > >> > > > > > >> > Actually, did you apply the patch (not officially accepted) I sent > > > in > > > > > >> > most recently. > > > > > >> > > > > > > >> > That was the same kind of stack trace I was getting whenever I > > > loaded > > > > > >> > a page a second time in my app (i.e. after a button submission). > > > The > > > > > >> > problem occured because I was dynamically creating components that > > > > > >> > weren't in the xml file. > > > > > >> > > > > > > >> > It's related to storing things in the session, and I think my > > > solution > > > > > >> > solves the problem succesfully and hopefully makes Jose happy so he > > > > > >> > includes it. I haven't heard from Jose on the list in about a week > > > > > >> > now. > > > > > >> > > > > > > >> > -Rob > > > > > >> > > > > > > >> > On 6/21/07, Jonathan Benedicto <co...@jo...> wrote: > > > > > >> >> Hi All, > > > > > >> >> > > > > > >> >> Just run into a problem with the VCL and tables containing a field > > > > > >> >> called > > > > > >> >> Name. > > > > > >> >> > > > > > >> >> If a table contains a field called "Name", when the page is > > > serialized > > > > > >> >> into > > > > > >> >> the PHP session, the table's Name field value is used to write out > > > the > > > > > >> >> name > > > > > >> >> of the component to the serialized stream. > > > > > >> >> > > > > > >> >> To see this problem in action, open the QuerySample in the > > > > > >> >> vcl\samples\DataAware\query, and set it to use a table that has a > > > Name > > > > > >> >> field. Run the example, and hit the button. You should get a > > > message: > > > > > >> >> > > > > > >> >> Application raised an exception class EPropertyNotFound with > > > message > > > > > >> >> 'Error > > > > > >> >> using a property, not defined as a member [QuerySample.Ships]' > > > > > >> >> Callstack #0 File: C:\Users\Jonathan\Downloads\querysample.php > > > Line: > > > > > >> >> 53 > > > > > >> >> |_Callstack #1 File: C:\Program Files (x86)\CodeGear\Delphi for > > > > > >> >> PHP\1.0\vcl\classes.inc.php Line: 1380 > > > > > >> >> |_Callstack #2 File: C:\Program Files (x86)\CodeGear\Delphi for > > > > > >> >> PHP\1.0\vcl\classes.inc.php Line: 1415 > > > > > >> >> > > > > > >> >> Jon > > > > > >> >> > > > > > >> >> > > > > > >> > > > >> ------------------------------------------------------------------------- > > > > > >> >> This SF.net email is sponsored by DB2 Express > > > > > >> >> Download DB2 Express C - the FREE version of DB2 express and take > > > > > >> >> control of your XML. No limits. Just data. Click to get it now. > > > > > >> >> http://sourceforge.net/powerbar/db2/ > > > > > >> >> _______________________________________________ > > > > > >> >> vcl4php-developers mailing list > > > > > >> >> vcl...@li... > > > > > >> >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > >> >> > > > > > >> > > > > > > >> > > > > > > >> > -- > > > > > >> > Rob Wilkens > > > > > >> > http://RobWilkens.com > > > > > >> > 516-874-0579 > > > > > >> > > > > > > >> > > > > ------------------------------------------------------------------------- > > > > > >> > This SF.net email is sponsored by DB2 Express > > > > > >> > Download DB2 Express C - the FREE version of DB2 express and take > > > > > >> > control of your XML. No limits. Just data. Click to get it now. > > > > > >> > http://sourceforge.net/powerbar/db2/ > > > > > >> > _______________________________________________ > > > > > >> > vcl4php-developers mailing list > > > > > >> > vcl...@li... > > > > > >> > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > >> > > > > > > >> > > > > > >> > > > > > > > > >> ------------------------------------------------------------------------- > > > > > >> This SF.net email is sponsored by DB2 Express > > > > > >> Download DB2 Express C - the FREE version of DB2 express and take > > > > > >> control of your XML. No limits. Just data. Click to get it now. > > > > > >> http://sourceforge.net/powerbar/db2/ > > > > > >> _______________________________________________ > > > > > >> vcl4php-developers mailing list > > > > > >> vcl...@li... > > > > > >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > >> > > > > > > > > > > > > > > > > > > -- > > > > > > Rob Wilkens > > > > > > http://RobWilkens.com > > > > > > 516-874-0579 > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > This SF.net email is sponsored by DB2 Express > > > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > > > control of your XML. No limits. Just data. Click to get it now. > > > > > > http://sourceforge.net/powerbar/db2/ > > > > > > _______________________________________________ > > > > > > vcl4php-developers mailing list > > > > > > vcl...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > This SF.net email is sponsored by DB2 Express > > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > > control of your XML. No limits. Just data. Click to get it now. > > > > > http://sourceforge.net/powerbar/db2/ > > > > > _______________________________________________ > > > > > vcl4php-developers mailing list > > > > > vcl...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > > > > > > > > > > > > > -- > > > > Rob Wilkens > > > > http://RobWilkens.com > > > > 516-874-0579 > > > > > > > > > > > > > ---------------------------------------------------------------------------- > > > ---- > > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by DB2 Express > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > control of your XML. No limits. Just data. Click to get it now. > > > > http://sourceforge.net/powerbar/db2/ > > > > > > > > > ---------------------------------------------------------------------------- > > > ---- > > > > > > > > > > _______________________________________________ > > > > vcl4php-developers mailing list > > > > vcl...@li... > > > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > _______________________________________________ > > > vcl4php-developers mailing list > > > vcl...@li... > > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > > > > > -- > > Rob Wilkens > > http://RobWilkens.com > > 516-874-0579 > > > > > -- > Rob Wilkens > http://RobWilkens.com > 516-874-0579 > -- Rob Wilkens http://RobWilkens.com 516-874-0579 |
From: Rob W. <rob...@gm...> - 2007-06-24 05:32:45
|
Update: I was wrong, upon further investigation. Somehow $Query1->Name is being set to the Name field in the databases' last value. This looks bad, but is probably fix-able. I'm continuuing to investigate. -Rob On 6/24/07, Rob Wilkens <rob...@gm...> wrote: > Yes, I checked (couldn't sleep after I got your mail) and my patch > apparently does fix your first error.... > > This second error seems more interesting.. I may find the source tonight. > > What I learned so far: > -On first page load (which is how I know it's disconnected from my > fix), Query1 is of type 'stdClass' as opposed to type Query. > -It doesn't have any properties other than the ones assigned to it in > source (the property editors settings don't get attached to it). > > Put another way, the xml file settings for Query1 don't "take". > > I don't know if this is a new problem (I imagine it is). > > -Rob > > On 6/23/07, Jonathan Benedicto <co...@jo...> wrote: > > Aha, I get the same error. It used to be different, but I think your patch > > changed it. > > > > Interesting. Looking forward to hearing more details on your investigation > > :-) > > > > Jon > > > > ----- Original Message ----- > > From: "Rob Wilkens" <rob...@gm...> > > To: <vcl...@li...> > > Sent: Saturday, June 23, 2007 11:07 PM > > Subject: Re: [vcl4php-developers] problem with Name fields > > > > > > > Not sure if it's batch patch, but with my latest (I think the "June14" > > > patch) it worked for me. I'm not 100% sure that for what I did my > > > patch would have had an effect until I submitted the button, and when > > > I submitted the button I got a new error (see below). > > > > > > Here's my sample screenshot to illustrate, with actual data (I blacked > > > out the names from the screeshot). > > > > > > Please take a look and tell me if I did something differently than > > > you. I do have a "Name" field here, it was pre-existing prior to my > > > Delphi for PHP days. > > > > > > Note: If I click to filter, I get the following error, possibly > > > because I didn't set up the filter for my dataset: > > > > > > Fatal error: Call to undefined method stdClass::Prepare() in > > > C:\Program Files\CodeGear\Delphi for > > > PHP\1.0\vcl-orig-modbyrob\samples\Data Aware\query\querysample.php on > > > line 37 > > > > > > I haven't had the time to debug this error... I'm going to sleep > > > (it's late here). > > > > > > Have a good night and good luck! > > > > > > -Rob > > > > > > On 6/23/07, Jonathan Benedicto <co...@jo...> wrote: > > > > Hi Rob, > > > > > > > > Trying to locate your patch, is it the "BatchPatch.patch" file that > > alters > > > > classes.inc.php, stdctrls.inc.php and forms.inc.php? If it is, I think I > > > > applied it correctly, but it doesn't solve the problem. > > > > > > > > I've just run into this problem again, this time with fields called > > "State". > > > > I'm beginning to wonder whether the VCL For PHP's design, where you can > > use > > > > the field name as the properties of the DataSet-derived components, is > > > > sound. The VCL For Win32 uses FieldByName, which, IMO, is a safer and > > less > > > > bug-prone design. > > > > > > > > Jon > > > > > > > > ----- Original Message ----- > > > > From: "Rob Wilkens" <rob...@gm...> > > > > To: <vcl...@li...> > > > > Sent: Friday, June 22, 2007 8:01 PM > > > > Subject: Re: [vcl4php-developers] problem with Name fields > > > > > > > > > > > > > Whenever you get around to it, please post your resuilts here > > > > > (positive or negative). It might help the process along if we know > > > > > we're dealing with the same problem and the patch does fix it. I > > > > > believe it should. > > > > > > > > > > I'm a little concerned that the last I heard from Jose was when i > > > > > replied to a private message of his on the list after he asked me to > > > > > not e-mail him privately again. Perhaps I violated his privacy by > > > > > doing that, I guess, and maybe he's offended, in which case -- If > > > > > you're reading Jose, I'm sorry for doing that if it bothered you. I > > > > > didn't mean to be rude. > > > > > > > > > > -Rob > > > > > > > > > > On 6/22/07, Jonathan Benedicto <co...@jo...> wrote: > > > > >> Hi Rob, > > > > >> > > > > >> No, I didn't apply the patch - I'll try it and see if it fixes it. > > > > >> > > > > >> Jose has been rather quiet lately, hope he's ok. > > > > >> > > > > >> Jon > > > > >> > > > > >> ----- Original Message ----- > > > > >> From: "Rob Wilkens" <rob...@gm...> > > > > >> To: <vcl...@li...> > > > > >> Sent: Thursday, June 21, 2007 1:24 PM > > > > >> Subject: Re: [vcl4php-developers] problem with Name fields > > > > >> > > > > >> > > > > >> > Actually, did you apply the patch (not officially accepted) I sent > > in > > > > >> > most recently. > > > > >> > > > > > >> > That was the same kind of stack trace I was getting whenever I > > loaded > > > > >> > a page a second time in my app (i.e. after a button submission). > > The > > > > >> > problem occured because I was dynamically creating components that > > > > >> > weren't in the xml file. > > > > >> > > > > > >> > It's related to storing things in the session, and I think my > > solution > > > > >> > solves the problem succesfully and hopefully makes Jose happy so he > > > > >> > includes it. I haven't heard from Jose on the list in about a week > > > > >> > now. > > > > >> > > > > > >> > -Rob > > > > >> > > > > > >> > On 6/21/07, Jonathan Benedicto <co...@jo...> wrote: > > > > >> >> Hi All, > > > > >> >> > > > > >> >> Just run into a problem with the VCL and tables containing a field > > > > >> >> called > > > > >> >> Name. > > > > >> >> > > > > >> >> If a table contains a field called "Name", when the page is > > serialized > > > > >> >> into > > > > >> >> the PHP session, the table's Name field value is used to write out > > the > > > > >> >> name > > > > >> >> of the component to the serialized stream. > > > > >> >> > > > > >> >> To see this problem in action, open the QuerySample in the > > > > >> >> vcl\samples\DataAware\query, and set it to use a table that has a > > Name > > > > >> >> field. Run the example, and hit the button. You should get a > > message: > > > > >> >> > > > > >> >> Application raised an exception class EPropertyNotFound with > > message > > > > >> >> 'Error > > > > >> >> using a property, not defined as a member [QuerySample.Ships]' > > > > >> >> Callstack #0 File: C:\Users\Jonathan\Downloads\querysample.php > > Line: > > > > >> >> 53 > > > > >> >> |_Callstack #1 File: C:\Program Files (x86)\CodeGear\Delphi for > > > > >> >> PHP\1.0\vcl\classes.inc.php Line: 1380 > > > > >> >> |_Callstack #2 File: C:\Program Files (x86)\CodeGear\Delphi for > > > > >> >> PHP\1.0\vcl\classes.inc.php Line: 1415 > > > > >> >> > > > > >> >> Jon > > > > >> >> > > > > >> >> > > > > >> > > >> ------------------------------------------------------------------------- > > > > >> >> This SF.net email is sponsored by DB2 Express > > > > >> >> Download DB2 Express C - the FREE version of DB2 express and take > > > > >> >> control of your XML. No limits. Just data. Click to get it now. > > > > >> >> http://sourceforge.net/powerbar/db2/ > > > > >> >> _______________________________________________ > > > > >> >> vcl4php-developers mailing list > > > > >> >> vcl...@li... > > > > >> >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > >> >> > > > > >> > > > > > >> > > > > > >> > -- > > > > >> > Rob Wilkens > > > > >> > http://RobWilkens.com > > > > >> > 516-874-0579 > > > > >> > > > > > >> > > > ------------------------------------------------------------------------- > > > > >> > This SF.net email is sponsored by DB2 Express > > > > >> > Download DB2 Express C - the FREE version of DB2 express and take > > > > >> > control of your XML. No limits. Just data. Click to get it now. > > > > >> > http://sourceforge.net/powerbar/db2/ > > > > >> > _______________________________________________ > > > > >> > vcl4php-developers mailing list > > > > >> > vcl...@li... > > > > >> > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > >> > > > > > >> > > > > >> > > > > > > >> ------------------------------------------------------------------------- > > > > >> This SF.net email is sponsored by DB2 Express > > > > >> Download DB2 Express C - the FREE version of DB2 express and take > > > > >> control of your XML. No limits. Just data. Click to get it now. > > > > >> http://sourceforge.net/powerbar/db2/ > > > > >> _______________________________________________ > > > > >> vcl4php-developers mailing list > > > > >> vcl...@li... > > > > >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > >> > > > > > > > > > > > > > > > -- > > > > > Rob Wilkens > > > > > http://RobWilkens.com > > > > > 516-874-0579 > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > This SF.net email is sponsored by DB2 Express > > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > > control of your XML. No limits. Just data. Click to get it now. > > > > > http://sourceforge.net/powerbar/db2/ > > > > > _______________________________________________ > > > > > vcl4php-developers mailing list > > > > > vcl...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by DB2 Express > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > control of your XML. No limits. Just data. Click to get it now. > > > > http://sourceforge.net/powerbar/db2/ > > > > _______________________________________________ > > > > vcl4php-developers mailing list > > > > vcl...@li... > > > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > > > > > > > > > -- > > > Rob Wilkens > > > http://RobWilkens.com > > > 516-874-0579 > > > > > > > > > ---------------------------------------------------------------------------- > > ---- > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > > > > ---------------------------------------------------------------------------- > > ---- > > > > > > > _______________________________________________ > > > vcl4php-developers mailing list > > > vcl...@li... > > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > vcl4php-developers mailing list > > vcl...@li... > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > -- > Rob Wilkens > http://RobWilkens.com > 516-874-0579 > -- Rob Wilkens http://RobWilkens.com 516-874-0579 |
From: Rob W. <rob...@gm...> - 2007-06-24 05:03:28
|
Yes, I checked (couldn't sleep after I got your mail) and my patch apparently does fix your first error.... This second error seems more interesting.. I may find the source tonight. What I learned so far: -On first page load (which is how I know it's disconnected from my fix), Query1 is of type 'stdClass' as opposed to type Query. -It doesn't have any properties other than the ones assigned to it in source (the property editors settings don't get attached to it). Put another way, the xml file settings for Query1 don't "take". I don't know if this is a new problem (I imagine it is). -Rob On 6/23/07, Jonathan Benedicto <co...@jo...> wrote: > Aha, I get the same error. It used to be different, but I think your patch > changed it. > > Interesting. Looking forward to hearing more details on your investigation > :-) > > Jon > > ----- Original Message ----- > From: "Rob Wilkens" <rob...@gm...> > To: <vcl...@li...> > Sent: Saturday, June 23, 2007 11:07 PM > Subject: Re: [vcl4php-developers] problem with Name fields > > > > Not sure if it's batch patch, but with my latest (I think the "June14" > > patch) it worked for me. I'm not 100% sure that for what I did my > > patch would have had an effect until I submitted the button, and when > > I submitted the button I got a new error (see below). > > > > Here's my sample screenshot to illustrate, with actual data (I blacked > > out the names from the screeshot). > > > > Please take a look and tell me if I did something differently than > > you. I do have a "Name" field here, it was pre-existing prior to my > > Delphi for PHP days. > > > > Note: If I click to filter, I get the following error, possibly > > because I didn't set up the filter for my dataset: > > > > Fatal error: Call to undefined method stdClass::Prepare() in > > C:\Program Files\CodeGear\Delphi for > > PHP\1.0\vcl-orig-modbyrob\samples\Data Aware\query\querysample.php on > > line 37 > > > > I haven't had the time to debug this error... I'm going to sleep > > (it's late here). > > > > Have a good night and good luck! > > > > -Rob > > > > On 6/23/07, Jonathan Benedicto <co...@jo...> wrote: > > > Hi Rob, > > > > > > Trying to locate your patch, is it the "BatchPatch.patch" file that > alters > > > classes.inc.php, stdctrls.inc.php and forms.inc.php? If it is, I think I > > > applied it correctly, but it doesn't solve the problem. > > > > > > I've just run into this problem again, this time with fields called > "State". > > > I'm beginning to wonder whether the VCL For PHP's design, where you can > use > > > the field name as the properties of the DataSet-derived components, is > > > sound. The VCL For Win32 uses FieldByName, which, IMO, is a safer and > less > > > bug-prone design. > > > > > > Jon > > > > > > ----- Original Message ----- > > > From: "Rob Wilkens" <rob...@gm...> > > > To: <vcl...@li...> > > > Sent: Friday, June 22, 2007 8:01 PM > > > Subject: Re: [vcl4php-developers] problem with Name fields > > > > > > > > > > Whenever you get around to it, please post your resuilts here > > > > (positive or negative). It might help the process along if we know > > > > we're dealing with the same problem and the patch does fix it. I > > > > believe it should. > > > > > > > > I'm a little concerned that the last I heard from Jose was when i > > > > replied to a private message of his on the list after he asked me to > > > > not e-mail him privately again. Perhaps I violated his privacy by > > > > doing that, I guess, and maybe he's offended, in which case -- If > > > > you're reading Jose, I'm sorry for doing that if it bothered you. I > > > > didn't mean to be rude. > > > > > > > > -Rob > > > > > > > > On 6/22/07, Jonathan Benedicto <co...@jo...> wrote: > > > >> Hi Rob, > > > >> > > > >> No, I didn't apply the patch - I'll try it and see if it fixes it. > > > >> > > > >> Jose has been rather quiet lately, hope he's ok. > > > >> > > > >> Jon > > > >> > > > >> ----- Original Message ----- > > > >> From: "Rob Wilkens" <rob...@gm...> > > > >> To: <vcl...@li...> > > > >> Sent: Thursday, June 21, 2007 1:24 PM > > > >> Subject: Re: [vcl4php-developers] problem with Name fields > > > >> > > > >> > > > >> > Actually, did you apply the patch (not officially accepted) I sent > in > > > >> > most recently. > > > >> > > > > >> > That was the same kind of stack trace I was getting whenever I > loaded > > > >> > a page a second time in my app (i.e. after a button submission). > The > > > >> > problem occured because I was dynamically creating components that > > > >> > weren't in the xml file. > > > >> > > > > >> > It's related to storing things in the session, and I think my > solution > > > >> > solves the problem succesfully and hopefully makes Jose happy so he > > > >> > includes it. I haven't heard from Jose on the list in about a week > > > >> > now. > > > >> > > > > >> > -Rob > > > >> > > > > >> > On 6/21/07, Jonathan Benedicto <co...@jo...> wrote: > > > >> >> Hi All, > > > >> >> > > > >> >> Just run into a problem with the VCL and tables containing a field > > > >> >> called > > > >> >> Name. > > > >> >> > > > >> >> If a table contains a field called "Name", when the page is > serialized > > > >> >> into > > > >> >> the PHP session, the table's Name field value is used to write out > the > > > >> >> name > > > >> >> of the component to the serialized stream. > > > >> >> > > > >> >> To see this problem in action, open the QuerySample in the > > > >> >> vcl\samples\DataAware\query, and set it to use a table that has a > Name > > > >> >> field. Run the example, and hit the button. You should get a > message: > > > >> >> > > > >> >> Application raised an exception class EPropertyNotFound with > message > > > >> >> 'Error > > > >> >> using a property, not defined as a member [QuerySample.Ships]' > > > >> >> Callstack #0 File: C:\Users\Jonathan\Downloads\querysample.php > Line: > > > >> >> 53 > > > >> >> |_Callstack #1 File: C:\Program Files (x86)\CodeGear\Delphi for > > > >> >> PHP\1.0\vcl\classes.inc.php Line: 1380 > > > >> >> |_Callstack #2 File: C:\Program Files (x86)\CodeGear\Delphi for > > > >> >> PHP\1.0\vcl\classes.inc.php Line: 1415 > > > >> >> > > > >> >> Jon > > > >> >> > > > >> >> > > > >> > >> ------------------------------------------------------------------------- > > > >> >> This SF.net email is sponsored by DB2 Express > > > >> >> Download DB2 Express C - the FREE version of DB2 express and take > > > >> >> control of your XML. No limits. Just data. Click to get it now. > > > >> >> http://sourceforge.net/powerbar/db2/ > > > >> >> _______________________________________________ > > > >> >> vcl4php-developers mailing list > > > >> >> vcl...@li... > > > >> >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > >> >> > > > >> > > > > >> > > > > >> > -- > > > >> > Rob Wilkens > > > >> > http://RobWilkens.com > > > >> > 516-874-0579 > > > >> > > > > >> > > ------------------------------------------------------------------------- > > > >> > This SF.net email is sponsored by DB2 Express > > > >> > Download DB2 Express C - the FREE version of DB2 express and take > > > >> > control of your XML. No limits. Just data. Click to get it now. > > > >> > http://sourceforge.net/powerbar/db2/ > > > >> > _______________________________________________ > > > >> > vcl4php-developers mailing list > > > >> > vcl...@li... > > > >> > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > >> > > > > >> > > > >> > > > > >> ------------------------------------------------------------------------- > > > >> This SF.net email is sponsored by DB2 Express > > > >> Download DB2 Express C - the FREE version of DB2 express and take > > > >> control of your XML. No limits. Just data. Click to get it now. > > > >> http://sourceforge.net/powerbar/db2/ > > > >> _______________________________________________ > > > >> vcl4php-developers mailing list > > > >> vcl...@li... > > > >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > >> > > > > > > > > > > > > -- > > > > Rob Wilkens > > > > http://RobWilkens.com > > > > 516-874-0579 > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by DB2 Express > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > control of your XML. No limits. Just data. Click to get it now. > > > > http://sourceforge.net/powerbar/db2/ > > > > _______________________________________________ > > > > vcl4php-developers mailing list > > > > vcl...@li... > > > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > _______________________________________________ > > > vcl4php-developers mailing list > > > vcl...@li... > > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > > > > > -- > > Rob Wilkens > > http://RobWilkens.com > > 516-874-0579 > > > > > ---------------------------------------------------------------------------- > ---- > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > > ---------------------------------------------------------------------------- > ---- > > > > _______________________________________________ > > vcl4php-developers mailing list > > vcl...@li... > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > vcl4php-developers mailing list > vcl...@li... > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > -- Rob Wilkens http://RobWilkens.com 516-874-0579 |
From: Jonathan B. <co...@jo...> - 2007-06-24 03:40:53
|
Aha, I get the same error. It used to be different, but I think your patch changed it. Interesting. Looking forward to hearing more details on your investigation :-) Jon ----- Original Message ----- From: "Rob Wilkens" <rob...@gm...> To: <vcl...@li...> Sent: Saturday, June 23, 2007 11:07 PM Subject: Re: [vcl4php-developers] problem with Name fields > Not sure if it's batch patch, but with my latest (I think the "June14" > patch) it worked for me. I'm not 100% sure that for what I did my > patch would have had an effect until I submitted the button, and when > I submitted the button I got a new error (see below). > > Here's my sample screenshot to illustrate, with actual data (I blacked > out the names from the screeshot). > > Please take a look and tell me if I did something differently than > you. I do have a "Name" field here, it was pre-existing prior to my > Delphi for PHP days. > > Note: If I click to filter, I get the following error, possibly > because I didn't set up the filter for my dataset: > > Fatal error: Call to undefined method stdClass::Prepare() in > C:\Program Files\CodeGear\Delphi for > PHP\1.0\vcl-orig-modbyrob\samples\Data Aware\query\querysample.php on > line 37 > > I haven't had the time to debug this error... I'm going to sleep > (it's late here). > > Have a good night and good luck! > > -Rob > > On 6/23/07, Jonathan Benedicto <co...@jo...> wrote: > > Hi Rob, > > > > Trying to locate your patch, is it the "BatchPatch.patch" file that alters > > classes.inc.php, stdctrls.inc.php and forms.inc.php? If it is, I think I > > applied it correctly, but it doesn't solve the problem. > > > > I've just run into this problem again, this time with fields called "State". > > I'm beginning to wonder whether the VCL For PHP's design, where you can use > > the field name as the properties of the DataSet-derived components, is > > sound. The VCL For Win32 uses FieldByName, which, IMO, is a safer and less > > bug-prone design. > > > > Jon > > > > ----- Original Message ----- > > From: "Rob Wilkens" <rob...@gm...> > > To: <vcl...@li...> > > Sent: Friday, June 22, 2007 8:01 PM > > Subject: Re: [vcl4php-developers] problem with Name fields > > > > > > > Whenever you get around to it, please post your resuilts here > > > (positive or negative). It might help the process along if we know > > > we're dealing with the same problem and the patch does fix it. I > > > believe it should. > > > > > > I'm a little concerned that the last I heard from Jose was when i > > > replied to a private message of his on the list after he asked me to > > > not e-mail him privately again. Perhaps I violated his privacy by > > > doing that, I guess, and maybe he's offended, in which case -- If > > > you're reading Jose, I'm sorry for doing that if it bothered you. I > > > didn't mean to be rude. > > > > > > -Rob > > > > > > On 6/22/07, Jonathan Benedicto <co...@jo...> wrote: > > >> Hi Rob, > > >> > > >> No, I didn't apply the patch - I'll try it and see if it fixes it. > > >> > > >> Jose has been rather quiet lately, hope he's ok. > > >> > > >> Jon > > >> > > >> ----- Original Message ----- > > >> From: "Rob Wilkens" <rob...@gm...> > > >> To: <vcl...@li...> > > >> Sent: Thursday, June 21, 2007 1:24 PM > > >> Subject: Re: [vcl4php-developers] problem with Name fields > > >> > > >> > > >> > Actually, did you apply the patch (not officially accepted) I sent in > > >> > most recently. > > >> > > > >> > That was the same kind of stack trace I was getting whenever I loaded > > >> > a page a second time in my app (i.e. after a button submission). The > > >> > problem occured because I was dynamically creating components that > > >> > weren't in the xml file. > > >> > > > >> > It's related to storing things in the session, and I think my solution > > >> > solves the problem succesfully and hopefully makes Jose happy so he > > >> > includes it. I haven't heard from Jose on the list in about a week > > >> > now. > > >> > > > >> > -Rob > > >> > > > >> > On 6/21/07, Jonathan Benedicto <co...@jo...> wrote: > > >> >> Hi All, > > >> >> > > >> >> Just run into a problem with the VCL and tables containing a field > > >> >> called > > >> >> Name. > > >> >> > > >> >> If a table contains a field called "Name", when the page is serialized > > >> >> into > > >> >> the PHP session, the table's Name field value is used to write out the > > >> >> name > > >> >> of the component to the serialized stream. > > >> >> > > >> >> To see this problem in action, open the QuerySample in the > > >> >> vcl\samples\DataAware\query, and set it to use a table that has a Name > > >> >> field. Run the example, and hit the button. You should get a message: > > >> >> > > >> >> Application raised an exception class EPropertyNotFound with message > > >> >> 'Error > > >> >> using a property, not defined as a member [QuerySample.Ships]' > > >> >> Callstack #0 File: C:\Users\Jonathan\Downloads\querysample.php Line: > > >> >> 53 > > >> >> |_Callstack #1 File: C:\Program Files (x86)\CodeGear\Delphi for > > >> >> PHP\1.0\vcl\classes.inc.php Line: 1380 > > >> >> |_Callstack #2 File: C:\Program Files (x86)\CodeGear\Delphi for > > >> >> PHP\1.0\vcl\classes.inc.php Line: 1415 > > >> >> > > >> >> Jon > > >> >> > > >> >> > > >> >> ------------------------------------------------------------------------- > > >> >> This SF.net email is sponsored by DB2 Express > > >> >> Download DB2 Express C - the FREE version of DB2 express and take > > >> >> control of your XML. No limits. Just data. Click to get it now. > > >> >> http://sourceforge.net/powerbar/db2/ > > >> >> _______________________________________________ > > >> >> vcl4php-developers mailing list > > >> >> vcl...@li... > > >> >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > >> >> > > >> > > > >> > > > >> > -- > > >> > Rob Wilkens > > >> > http://RobWilkens.com > > >> > 516-874-0579 > > >> > > > >> > ------------------------------------------------------------------------- > > >> > This SF.net email is sponsored by DB2 Express > > >> > Download DB2 Express C - the FREE version of DB2 express and take > > >> > control of your XML. No limits. Just data. Click to get it now. > > >> > http://sourceforge.net/powerbar/db2/ > > >> > _______________________________________________ > > >> > vcl4php-developers mailing list > > >> > vcl...@li... > > >> > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > >> > > > >> > > >> > > >> ------------------------------------------------------------------------- > > >> This SF.net email is sponsored by DB2 Express > > >> Download DB2 Express C - the FREE version of DB2 express and take > > >> control of your XML. No limits. Just data. Click to get it now. > > >> http://sourceforge.net/powerbar/db2/ > > >> _______________________________________________ > > >> vcl4php-developers mailing list > > >> vcl...@li... > > >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > >> > > > > > > > > > -- > > > Rob Wilkens > > > http://RobWilkens.com > > > 516-874-0579 > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > _______________________________________________ > > > vcl4php-developers mailing list > > > vcl...@li... > > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > vcl4php-developers mailing list > > vcl...@li... > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > -- > Rob Wilkens > http://RobWilkens.com > 516-874-0579 > ---------------------------------------------------------------------------- ---- > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ ---------------------------------------------------------------------------- ---- > _______________________________________________ > vcl4php-developers mailing list > vcl...@li... > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > |
From: Rob W. <rob...@gm...> - 2007-06-24 03:07:26
|
Not sure if it's batch patch, but with my latest (I think the "June14" patch) it worked for me. I'm not 100% sure that for what I did my patch would have had an effect until I submitted the button, and when I submitted the button I got a new error (see below). Here's my sample screenshot to illustrate, with actual data (I blacked out the names from the screeshot). Please take a look and tell me if I did something differently than you. I do have a "Name" field here, it was pre-existing prior to my Delphi for PHP days. Note: If I click to filter, I get the following error, possibly because I didn't set up the filter for my dataset: Fatal error: Call to undefined method stdClass::Prepare() in C:\Program Files\CodeGear\Delphi for PHP\1.0\vcl-orig-modbyrob\samples\Data Aware\query\querysample.php on line 37 I haven't had the time to debug this error... I'm going to sleep (it's late here). Have a good night and good luck! -Rob On 6/23/07, Jonathan Benedicto <co...@jo...> wrote: > Hi Rob, > > Trying to locate your patch, is it the "BatchPatch.patch" file that alters > classes.inc.php, stdctrls.inc.php and forms.inc.php? If it is, I think I > applied it correctly, but it doesn't solve the problem. > > I've just run into this problem again, this time with fields called "State". > I'm beginning to wonder whether the VCL For PHP's design, where you can use > the field name as the properties of the DataSet-derived components, is > sound. The VCL For Win32 uses FieldByName, which, IMO, is a safer and less > bug-prone design. > > Jon > > ----- Original Message ----- > From: "Rob Wilkens" <rob...@gm...> > To: <vcl...@li...> > Sent: Friday, June 22, 2007 8:01 PM > Subject: Re: [vcl4php-developers] problem with Name fields > > > > Whenever you get around to it, please post your resuilts here > > (positive or negative). It might help the process along if we know > > we're dealing with the same problem and the patch does fix it. I > > believe it should. > > > > I'm a little concerned that the last I heard from Jose was when i > > replied to a private message of his on the list after he asked me to > > not e-mail him privately again. Perhaps I violated his privacy by > > doing that, I guess, and maybe he's offended, in which case -- If > > you're reading Jose, I'm sorry for doing that if it bothered you. I > > didn't mean to be rude. > > > > -Rob > > > > On 6/22/07, Jonathan Benedicto <co...@jo...> wrote: > >> Hi Rob, > >> > >> No, I didn't apply the patch - I'll try it and see if it fixes it. > >> > >> Jose has been rather quiet lately, hope he's ok. > >> > >> Jon > >> > >> ----- Original Message ----- > >> From: "Rob Wilkens" <rob...@gm...> > >> To: <vcl...@li...> > >> Sent: Thursday, June 21, 2007 1:24 PM > >> Subject: Re: [vcl4php-developers] problem with Name fields > >> > >> > >> > Actually, did you apply the patch (not officially accepted) I sent in > >> > most recently. > >> > > >> > That was the same kind of stack trace I was getting whenever I loaded > >> > a page a second time in my app (i.e. after a button submission). The > >> > problem occured because I was dynamically creating components that > >> > weren't in the xml file. > >> > > >> > It's related to storing things in the session, and I think my solution > >> > solves the problem succesfully and hopefully makes Jose happy so he > >> > includes it. I haven't heard from Jose on the list in about a week > >> > now. > >> > > >> > -Rob > >> > > >> > On 6/21/07, Jonathan Benedicto <co...@jo...> wrote: > >> >> Hi All, > >> >> > >> >> Just run into a problem with the VCL and tables containing a field > >> >> called > >> >> Name. > >> >> > >> >> If a table contains a field called "Name", when the page is serialized > >> >> into > >> >> the PHP session, the table's Name field value is used to write out the > >> >> name > >> >> of the component to the serialized stream. > >> >> > >> >> To see this problem in action, open the QuerySample in the > >> >> vcl\samples\DataAware\query, and set it to use a table that has a Name > >> >> field. Run the example, and hit the button. You should get a message: > >> >> > >> >> Application raised an exception class EPropertyNotFound with message > >> >> 'Error > >> >> using a property, not defined as a member [QuerySample.Ships]' > >> >> Callstack #0 File: C:\Users\Jonathan\Downloads\querysample.php Line: > >> >> 53 > >> >> |_Callstack #1 File: C:\Program Files (x86)\CodeGear\Delphi for > >> >> PHP\1.0\vcl\classes.inc.php Line: 1380 > >> >> |_Callstack #2 File: C:\Program Files (x86)\CodeGear\Delphi for > >> >> PHP\1.0\vcl\classes.inc.php Line: 1415 > >> >> > >> >> Jon > >> >> > >> >> > >> >> ------------------------------------------------------------------------- > >> >> This SF.net email is sponsored by DB2 Express > >> >> Download DB2 Express C - the FREE version of DB2 express and take > >> >> control of your XML. No limits. Just data. Click to get it now. > >> >> http://sourceforge.net/powerbar/db2/ > >> >> _______________________________________________ > >> >> vcl4php-developers mailing list > >> >> vcl...@li... > >> >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > >> >> > >> > > >> > > >> > -- > >> > Rob Wilkens > >> > http://RobWilkens.com > >> > 516-874-0579 > >> > > >> > ------------------------------------------------------------------------- > >> > This SF.net email is sponsored by DB2 Express > >> > Download DB2 Express C - the FREE version of DB2 express and take > >> > control of your XML. No limits. Just data. Click to get it now. > >> > http://sourceforge.net/powerbar/db2/ > >> > _______________________________________________ > >> > vcl4php-developers mailing list > >> > vcl...@li... > >> > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > >> > > >> > >> > >> ------------------------------------------------------------------------- > >> This SF.net email is sponsored by DB2 Express > >> Download DB2 Express C - the FREE version of DB2 express and take > >> control of your XML. No limits. Just data. Click to get it now. > >> http://sourceforge.net/powerbar/db2/ > >> _______________________________________________ > >> vcl4php-developers mailing list > >> vcl...@li... > >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > >> > > > > > > -- > > Rob Wilkens > > http://RobWilkens.com > > 516-874-0579 > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > vcl4php-developers mailing list > > vcl...@li... > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > vcl4php-developers mailing list > vcl...@li... > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > -- Rob Wilkens http://RobWilkens.com 516-874-0579 |
From: Jonathan B. <co...@jo...> - 2007-06-24 02:37:39
|
Hi Rob, Trying to locate your patch, is it the "BatchPatch.patch" file that alters classes.inc.php, stdctrls.inc.php and forms.inc.php? If it is, I think I applied it correctly, but it doesn't solve the problem. I've just run into this problem again, this time with fields called "State". I'm beginning to wonder whether the VCL For PHP's design, where you can use the field name as the properties of the DataSet-derived components, is sound. The VCL For Win32 uses FieldByName, which, IMO, is a safer and less bug-prone design. Jon ----- Original Message ----- From: "Rob Wilkens" <rob...@gm...> To: <vcl...@li...> Sent: Friday, June 22, 2007 8:01 PM Subject: Re: [vcl4php-developers] problem with Name fields > Whenever you get around to it, please post your resuilts here > (positive or negative). It might help the process along if we know > we're dealing with the same problem and the patch does fix it. I > believe it should. > > I'm a little concerned that the last I heard from Jose was when i > replied to a private message of his on the list after he asked me to > not e-mail him privately again. Perhaps I violated his privacy by > doing that, I guess, and maybe he's offended, in which case -- If > you're reading Jose, I'm sorry for doing that if it bothered you. I > didn't mean to be rude. > > -Rob > > On 6/22/07, Jonathan Benedicto <co...@jo...> wrote: >> Hi Rob, >> >> No, I didn't apply the patch - I'll try it and see if it fixes it. >> >> Jose has been rather quiet lately, hope he's ok. >> >> Jon >> >> ----- Original Message ----- >> From: "Rob Wilkens" <rob...@gm...> >> To: <vcl...@li...> >> Sent: Thursday, June 21, 2007 1:24 PM >> Subject: Re: [vcl4php-developers] problem with Name fields >> >> >> > Actually, did you apply the patch (not officially accepted) I sent in >> > most recently. >> > >> > That was the same kind of stack trace I was getting whenever I loaded >> > a page a second time in my app (i.e. after a button submission). The >> > problem occured because I was dynamically creating components that >> > weren't in the xml file. >> > >> > It's related to storing things in the session, and I think my solution >> > solves the problem succesfully and hopefully makes Jose happy so he >> > includes it. I haven't heard from Jose on the list in about a week >> > now. >> > >> > -Rob >> > >> > On 6/21/07, Jonathan Benedicto <co...@jo...> wrote: >> >> Hi All, >> >> >> >> Just run into a problem with the VCL and tables containing a field >> >> called >> >> Name. >> >> >> >> If a table contains a field called "Name", when the page is serialized >> >> into >> >> the PHP session, the table's Name field value is used to write out the >> >> name >> >> of the component to the serialized stream. >> >> >> >> To see this problem in action, open the QuerySample in the >> >> vcl\samples\DataAware\query, and set it to use a table that has a Name >> >> field. Run the example, and hit the button. You should get a message: >> >> >> >> Application raised an exception class EPropertyNotFound with message >> >> 'Error >> >> using a property, not defined as a member [QuerySample.Ships]' >> >> Callstack #0 File: C:\Users\Jonathan\Downloads\querysample.php Line: >> >> 53 >> >> |_Callstack #1 File: C:\Program Files (x86)\CodeGear\Delphi for >> >> PHP\1.0\vcl\classes.inc.php Line: 1380 >> >> |_Callstack #2 File: C:\Program Files (x86)\CodeGear\Delphi for >> >> PHP\1.0\vcl\classes.inc.php Line: 1415 >> >> >> >> Jon >> >> >> >> >> >> ------------------------------------------------------------------------- >> >> This SF.net email is sponsored by DB2 Express >> >> Download DB2 Express C - the FREE version of DB2 express and take >> >> control of your XML. No limits. Just data. Click to get it now. >> >> http://sourceforge.net/powerbar/db2/ >> >> _______________________________________________ >> >> vcl4php-developers mailing list >> >> vcl...@li... >> >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers >> >> >> > >> > >> > -- >> > Rob Wilkens >> > http://RobWilkens.com >> > 516-874-0579 >> > >> > ------------------------------------------------------------------------- >> > This SF.net email is sponsored by DB2 Express >> > Download DB2 Express C - the FREE version of DB2 express and take >> > control of your XML. No limits. Just data. Click to get it now. >> > http://sourceforge.net/powerbar/db2/ >> > _______________________________________________ >> > vcl4php-developers mailing list >> > vcl...@li... >> > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers >> > >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> vcl4php-developers mailing list >> vcl...@li... >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers >> > > > -- > Rob Wilkens > http://RobWilkens.com > 516-874-0579 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > vcl4php-developers mailing list > vcl...@li... > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers |
From: Tiago L. T. <ti...@la...> - 2007-06-23 21:22:53
|
Hi all, Here's a new patch for Window component ChangeLog: + Added to Window component the following JavaScript events: OnResize, OnMove, OnMinimize, OnRestore and OnMaximize. Known issues: OnMove and OnResize are fired twice it window is moved/resized in both directions (ie. changed with and height or changed left and top). -- Tiago Lima Trinidad |
From: Jonathan B. <co...@jo...> - 2007-06-23 16:17:58
|
Hi, You can get the archives of this mailing list here: https://lists.sourceforge.net/lists/listinfo/vcl4php-developers HTH Jon ----- Original Message -----=20 From: Jeroen Pluimers=20 To: vcl...@li...=20 Sent: Saturday, June 23, 2007 6:35 AM Subject: [vcl4php-developers] Off-line access to these messages? Given the fact that I'm an off-line guy, I'd rather use newsgroups for = communicating. Newsgroups have two advantages: offline access, and history. Given the fact that there seems to be no vcl4php newsgroup, I'd like = to know how to cope with this: How can I get the content of the vcl4php-developers mailing list in an = offline way? Preferably in some way of threaded way, in email. --jeroen a Delphi for PHP guy=20 -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ -------------------------------------------------------------------------= ----- _______________________________________________ vcl4php-developers mailing list vcl...@li... https://lists.sourceforge.net/lists/listinfo/vcl4php-developers |
From: Rob W. <rob...@gm...> - 2007-06-23 11:26:09
|
There's D4PHP newsgroups -- see Borland's website. They're unrelated to this list though -Rob On 6/23/07, Jeroen Pluimers <jer...@pl...> wrote: > Given the fact that I'm an off-line guy, I'd rather use newsgroups for > communicating. > Newsgroups have two advantages: offline access, and history. > > Given the fact that there seems to be no vcl4php newsgroup, I'd like to know > how to cope with this: > How can I get the content of the vcl4php-developers mailing list in an > offline way? > Preferably in some way of threaded way, in email. > > --jeroen > a Delphi for PHP guy > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > vcl4php-developers mailing list > vcl...@li... > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > -- Rob Wilkens http://RobWilkens.com 516-874-0579 |
From: Jeroen P. <jer...@pl...> - 2007-06-23 10:35:52
|
Given the fact that I'm an off-line guy, I'd rather use newsgroups for communicating. Newsgroups have two advantages: offline access, and history. Given the fact that there seems to be no vcl4php newsgroup, I'd like to know how to cope with this: How can I get the content of the vcl4php-developers mailing list in an offline way? Preferably in some way of threaded way, in email. --jeroen a Delphi for PHP guy |
From: Jeroen P. <jer...@pl...> - 2007-06-23 08:06:33
|
Test to see if gmail redirection is compatible with the sourceforge mailing list system. --jeroen a Delphi for PHP guy |
From: Rob W. <rob...@gm...> - 2007-06-23 00:01:56
|
Whenever you get around to it, please post your resuilts here (positive or negative). It might help the process along if we know we're dealing with the same problem and the patch does fix it. I believe it should. I'm a little concerned that the last I heard from Jose was when i replied to a private message of his on the list after he asked me to not e-mail him privately again. Perhaps I violated his privacy by doing that, I guess, and maybe he's offended, in which case -- If you're reading Jose, I'm sorry for doing that if it bothered you. I didn't mean to be rude. -Rob On 6/22/07, Jonathan Benedicto <co...@jo...> wrote: > Hi Rob, > > No, I didn't apply the patch - I'll try it and see if it fixes it. > > Jose has been rather quiet lately, hope he's ok. > > Jon > > ----- Original Message ----- > From: "Rob Wilkens" <rob...@gm...> > To: <vcl...@li...> > Sent: Thursday, June 21, 2007 1:24 PM > Subject: Re: [vcl4php-developers] problem with Name fields > > > > Actually, did you apply the patch (not officially accepted) I sent in > > most recently. > > > > That was the same kind of stack trace I was getting whenever I loaded > > a page a second time in my app (i.e. after a button submission). The > > problem occured because I was dynamically creating components that > > weren't in the xml file. > > > > It's related to storing things in the session, and I think my solution > > solves the problem succesfully and hopefully makes Jose happy so he > > includes it. I haven't heard from Jose on the list in about a week > > now. > > > > -Rob > > > > On 6/21/07, Jonathan Benedicto <co...@jo...> wrote: > >> Hi All, > >> > >> Just run into a problem with the VCL and tables containing a field called > >> Name. > >> > >> If a table contains a field called "Name", when the page is serialized > >> into > >> the PHP session, the table's Name field value is used to write out the > >> name > >> of the component to the serialized stream. > >> > >> To see this problem in action, open the QuerySample in the > >> vcl\samples\DataAware\query, and set it to use a table that has a Name > >> field. Run the example, and hit the button. You should get a message: > >> > >> Application raised an exception class EPropertyNotFound with message > >> 'Error > >> using a property, not defined as a member [QuerySample.Ships]' > >> Callstack #0 File: C:\Users\Jonathan\Downloads\querysample.php Line: 53 > >> |_Callstack #1 File: C:\Program Files (x86)\CodeGear\Delphi for > >> PHP\1.0\vcl\classes.inc.php Line: 1380 > >> |_Callstack #2 File: C:\Program Files (x86)\CodeGear\Delphi for > >> PHP\1.0\vcl\classes.inc.php Line: 1415 > >> > >> Jon > >> > >> > >> ------------------------------------------------------------------------- > >> This SF.net email is sponsored by DB2 Express > >> Download DB2 Express C - the FREE version of DB2 express and take > >> control of your XML. No limits. Just data. Click to get it now. > >> http://sourceforge.net/powerbar/db2/ > >> _______________________________________________ > >> vcl4php-developers mailing list > >> vcl...@li... > >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > >> > > > > > > -- > > Rob Wilkens > > http://RobWilkens.com > > 516-874-0579 > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > vcl4php-developers mailing list > > vcl...@li... > > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > vcl4php-developers mailing list > vcl...@li... > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > -- Rob Wilkens http://RobWilkens.com 516-874-0579 |
From: Jonathan B. <co...@jo...> - 2007-06-22 23:46:40
|
Hi Rob, No, I didn't apply the patch - I'll try it and see if it fixes it. Jose has been rather quiet lately, hope he's ok. Jon ----- Original Message ----- From: "Rob Wilkens" <rob...@gm...> To: <vcl...@li...> Sent: Thursday, June 21, 2007 1:24 PM Subject: Re: [vcl4php-developers] problem with Name fields > Actually, did you apply the patch (not officially accepted) I sent in > most recently. > > That was the same kind of stack trace I was getting whenever I loaded > a page a second time in my app (i.e. after a button submission). The > problem occured because I was dynamically creating components that > weren't in the xml file. > > It's related to storing things in the session, and I think my solution > solves the problem succesfully and hopefully makes Jose happy so he > includes it. I haven't heard from Jose on the list in about a week > now. > > -Rob > > On 6/21/07, Jonathan Benedicto <co...@jo...> wrote: >> Hi All, >> >> Just run into a problem with the VCL and tables containing a field called >> Name. >> >> If a table contains a field called "Name", when the page is serialized >> into >> the PHP session, the table's Name field value is used to write out the >> name >> of the component to the serialized stream. >> >> To see this problem in action, open the QuerySample in the >> vcl\samples\DataAware\query, and set it to use a table that has a Name >> field. Run the example, and hit the button. You should get a message: >> >> Application raised an exception class EPropertyNotFound with message >> 'Error >> using a property, not defined as a member [QuerySample.Ships]' >> Callstack #0 File: C:\Users\Jonathan\Downloads\querysample.php Line: 53 >> |_Callstack #1 File: C:\Program Files (x86)\CodeGear\Delphi for >> PHP\1.0\vcl\classes.inc.php Line: 1380 >> |_Callstack #2 File: C:\Program Files (x86)\CodeGear\Delphi for >> PHP\1.0\vcl\classes.inc.php Line: 1415 >> >> Jon >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> vcl4php-developers mailing list >> vcl...@li... >> https://lists.sourceforge.net/lists/listinfo/vcl4php-developers >> > > > -- > Rob Wilkens > http://RobWilkens.com > 516-874-0579 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > vcl4php-developers mailing list > vcl...@li... > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > |
From: Rob W. <rob...@gm...> - 2007-06-22 23:39:32
|
It worked for me. How did you change the name of the class? I changed it in the designer (not the source). I renamed "Index" to "Rob", ran it and it ran fine. Note: I think there were some AJAX patches recently to SVN version of VCL4PHP. You may want to get the latest source - but back up the original vcl source first (else you'll have to re-run a D4PHP install). -Rob On 6/22/07, FrozenDice <fro...@gm...> wrote: > Ajax isn't working for me whenever the Form's name isn't the one it > originally was. If I open up the basicajax sample that came with > Delphi4PHP it will run, if I go and change the name of the form, save > then run it I get an alert that there was whitespace in the response. > It's too long to type so here's a screencap. > http://uomu.com/public/errorajax.jpg > > Can anyone else replicate this or is it just my system? > > - Daniel > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > vcl4php-developers mailing list > vcl...@li... > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > -- Rob Wilkens http://RobWilkens.com 516-874-0579 |
From: FrozenDice <fro...@gm...> - 2007-06-22 22:57:06
|
Ajax isn't working for me whenever the Form's name isn't the one it originally was. If I open up the basicajax sample that came with Delphi4PHP it will run, if I go and change the name of the form, save then run it I get an alert that there was whitespace in the response. It's too long to type so here's a screencap. http://uomu.com/public/errorajax.jpg Can anyone else replicate this or is it just my system? - Daniel |
From: Rob W. <rob...@gm...> - 2007-06-22 00:21:13
|
I don't think your vcl source tree is current/accurate, I would recommend c= learing and redownloading the latest svn version... But I could be wrong? -----Original Message----- From: FrozenDice <fro...@gm...> Sent: June 21, 2007 7:05 PM To: vcl...@li... Subject: Re: [vcl4php-developers] Trying to make a component extend Well I'm trying to make a new component, and when I try to use the component, eg. put it in a new application I get the error I was talking about earlier. It's complaining about a call to an undefined method. I'm extending CustomTreeView with MegaTree. For some reason it thinks that there is a call to MegaTree::setImageList(), when I have made no such call. There is a method in comcontrold.inc.php which as this name. I'm confused. - Dan >I see "readImageList()" and "writeImageList()" but no "getImageList()" >in CustomTreeView. If I access read/write functions, it works without >issue. > >Perhaps you can give an example of where you used this that you have a pro= blem? > >-Rob ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ vcl4php-developers mailing list vcl...@li... https://lists.sourceforge.net/lists/listinfo/vcl4php-developers |
From: FrozenDice <fro...@gm...> - 2007-06-21 23:05:43
|
Well I'm trying to make a new component, and when I try to use the component, eg. put it in a new application I get the error I was talking about earlier. It's complaining about a call to an undefined method. I'm extending CustomTreeView with MegaTree. For some reason it thinks that there is a call to MegaTree::setImageList(), when I have made no such call. There is a method in comcontrold.inc.php which as this name. I'm confused. - Dan >I see "readImageList()" and "writeImageList()" but no "getImageList()" >in CustomTreeView. If I access read/write functions, it works without >issue. > >Perhaps you can give an example of where you used this that you have a problem? > >-Rob |
From: Chris B. <cb...@gm...> - 2007-06-21 22:14:38
|
Actually I was first thinking about that too, but it allows the user to add more than one level of sub-items. ListView only needs the Item and multiple sub-items all on the same level. So basically it should work if it is handled correctly by the user. In the perfect world it would be nice to have the one from Delphi. ti...@la... wrote: > Hi Chris, > Regarding the property editor, why don't you use the one that comes with > D4PHP for editing the tree view? > |
From: <ti...@la...> - 2007-06-21 20:15:36
|
Hi Chris, Regarding the property editor, why don't you use the one that comes with D4PHP for editing the tree view? > Hi, > > Sorry for sending out a HTML e-mail! Here the plain text one so it's > readable in the SF archive... > > Here is a updated version of the ListView component to replace the > non-working one. I attached the diff files as well as the full files > based on Rev 61. "listview.php" is a sample of how to use ListView. > > Changelog: > + Added functionality to modify Columns and Items (only Columns can be > edited at design-time yet, read note at the end) > + Added ListColumn and ListItem which are derived from the Persistent > class; those classes > + Added persistence for selected items/rows (even when the ListView is > sorted on the client side) > ... since it is almost a complete new implementation everything changed, > the items above are just the main ones. > > The only thing that is still missing is the property editor for the > Items property. Haven't looked into writing property editors for D4PHP > yet, so if somebody likes to do it, never mind and go ahead :) > > Cheers! > Chris > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/_______________________________________________ > vcl4php-developers mailing list > vcl...@li... > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > |
From: Chris B. <cb...@gm...> - 2007-06-21 19:22:27
|
Hi, Sorry for sending out a HTML e-mail! Here the plain text one so it's readable in the SF archive... Here is a updated version of the ListView component to replace the non-working one. I attached the diff files as well as the full files based on Rev 61. "listview.php" is a sample of how to use ListView. Changelog: + Added functionality to modify Columns and Items (only Columns can be edited at design-time yet, read note at the end) + Added ListColumn and ListItem which are derived from the Persistent class; those classes + Added persistence for selected items/rows (even when the ListView is sorted on the client side) ... since it is almost a complete new implementation everything changed, the items above are just the main ones. The only thing that is still missing is the property editor for the Items property. Haven't looked into writing property editors for D4PHP yet, so if somebody likes to do it, never mind and go ahead :) Cheers! Chris |
From: Chris B. <cb...@gm...> - 2007-06-21 19:08:24
|
Index: comctrls.inc.php =================================================================== --- comctrls.inc.php (revision 61) +++ comctrls.inc.php (working copy) @@ -48,53 +48,583 @@ //define('lpLeft', 'lpLeft'); //define('lpRight', 'lpRight'); + /** - * ListView control +* Cell render types of ListColumn +*/ +define('creEdit', 'creEdit'); +define('creBoolean', 'creBoolean'); + +/** +* ListColumn represents a column of a ListView. +* +* Note: Currently qooxdoo (ListView uses a qooxdoo widget) does not allow +* "not sortable" columns, meaning all column are sortable on the client side. +*/ +class ListColumn extends Persistent +{ + protected $_caption=""; + protected $_cellrendertype=creEdit; + protected $_editable=0; + protected $_width=-1; + protected $_visible=1; + + /** + * Caption of the column. It defines the text that appears on to of the column. + * @return string + */ + function getCaption() { return $this->_caption; } + /** + * Caption of the column. It defines the text that appears on to of the column. + * @param string $value + */ + function setCaption($value) { $this->_caption=$value; } + function defaultCaption() { return ""; } + + /** + * The CellRenderType defines how the cells for a specific column are + * rendered. Current possible values are creEdit and creBoolean where creEdit + * is default. + * If the column has a cell render type of creEdit the property Editable has to + * be true in order to be able to edit the selected cell. Note that the edited + * values are not transfered to the VCL for PHP framework. They are available + * on client side only. + * If creBoolean is set the cell value needs to be set to true or false. + * The renderer then paints a checkbox. Note that it is read-only mode only. If + * Editable is set to true the user may enter text rather than changed the checkbox + * state. + * + * @return enum(creEdit, creBoolean) + */ + function getCellRenderType() { return $this->_cellrendertype; } + /** + * The CellRenderType defines how the cells for a specific column are + * rendered. Current possible values are creEdit and creBoolean where creEdit + * is default. + * If the column has a cell render type of creEdit the property Editable has to + * be true in order to be able to edit the selected cell. Note that the edited + * values are not transfered to the VCL for PHP framework. They are available + * on client side only. + * If creBoolean is set the cell value needs to be set to true or false. + * The renderer then paints a checkbox. Note that it is read-only mode only. If + * Editable is set to true the user may enter text rather than changed the checkbox + * state. + * + * @param enum(creEdit, creBoolean) $value + */ + function setCellRenderType($value) { $this->_cellrendertype=$value; } + function defaultCellRenderType() { return creEdit; } + + /** + * Defines if the cell in the column are editable. + * Note: If CellRenderType is set to creBoolean Editable should be set to false. + * For the reason read the comment for CellRenderType. + * + * @return bool + */ + function getEditable() { return $this->_editable; } + /** + * Defines if the cell in the column are editable. + * Note: If CellRenderType is set to creBoolean Editable should be set to false. + * For the reason read the comment for CellRenderType. + * + * @param bool $value + */ + function setEditable($value) { $this->_editable=$value; } + function defaultEditable() { return 0; } + + /** + * Width of the column. + * The width is not fixed and therefor can be changed be the user on the client side. + * The width may be specified as integer number of pixels (e.g. 100), + * a string representing percentage of the inner width of the Table (e.g. "25%"), + * or a string representing a flex width (e.g. "1*"). + * + * @return mixed + */ + function getWidth() { return $this->_width; } + /** + * Width of the column. + * The width is not fixed and therefor can be changed be the user on the client side. + * The width may be specified as integer number of pixels (e.g. 100), + * a string representing percentage of the inner width of the Table (e.g. "25%"), + * or a string representing a flex width (e.g. "1*"). + * + * @param mixed $value + */ + function setWidth($value) { $this->_width=$value; } + function defaultWidth() { return -1; } + + /** + * Determines if the Column is visible. + * @return bool + */ + function getVisible() { return $this->_visible; } + /** + * Determines if the Column is visible. + * @param bool $value + */ + function setVisible($value) { $this->_visible=$value; } + function defaultVisible() { return 1; } + + +} + +/** +* ListItem is an individual item of a ListView control. +* +* A ListItem specifies a row of the ListView, where Caption is the text shown in +* the first column and SubItems to following columns. +* Note that the count of ListColumn objects defines how many columns are shown, even +* if there are more SubItems. +* The ListItem was modeled after VCL for Windows, meaning that there is +* a caption and subitems. The caption is used for the first column where +* the subitems are used for any further column. +*/ +class ListItem extends Persistent +{ + protected $_caption=""; + protected $_data=null; + protected $_listview=null; + protected $_selected=0; + protected $_subitems=array(); + + /** + * Caption is the text shown in the first column of the row. + * @return string + */ + function getCaption() { return $this->_caption; } + /** + * Caption is the text shown in the first column of the row. + * @param string $value + */ + function setCaption($value) { $this->_caption=$value; } + function defaultCaption() { return ""; } + + /** + * Specifies any application-specific data associated with the list item. + * @return mixed + */ + function getData() { return $this->_data; } + /** + * Specifies any application-specific data associated with the list item. + * @param mixed $value + */ + function setData($value) { $this->_data=$value; } + function defaultData() { return null; } + + /** + * ListView is the reference back to the ListView where the ListItem + * belongs to. + * @return ListView + */ + function getListView() { return $this->_listview; } + /** + * ListView is the reference back to the ListView where the ListItem + * belongs to. + * @param ListView $value + */ + function setListView($value) { $this->_listview=$value; } + function defaultListView() { return null; } + + /** + * Indicates if the ListItem is selected or not. + * @return bool + */ + function getSelected() { return $this->_selected; } + /** + * Indicates if the ListItem is selected or not. + * @param bool $value + */ + function setSelected($value) { $this->_selected=$value; } + function defaultSelected() { return 0; } + + /** + * An array of SubItems that are shown in the remaing columns. + * Note that if there are more sub items defined than columns, only the sub items + * are visible the are within the count of the column. + * The output of the sub items starts at the second column since the first + * column is used for Caption. + * @return array + */ + function getSubItems() { return $this->_subitems; } + /** + * An array of SubItems that are shown in the remaing columns. + * Note that if there are more sub items defined than columns, only the sub items + * are visible the are within the count of the column. + * The output of the sub items starts at the second column since the first + * column is used for Caption. + * @param array $value + */ + function setSubItems($value) { $this->_subitems=$value; } + function defaultSubItems() { return array(); } +} + + +/** +* Selection types of ListView +*/ +define('selNone', 'selNone'); +define('selSingle', 'selSingle'); +define('selOneInterval', 'selOneInterval'); +define('selMultiInterval', 'selMultiInterval'); + +/** + * Base class of ListView control * + * Use CustomListView as a base class when defining a control that displays a + * list of items. CustomListView allows a list of items to be displayed in + * columns with column headers and sub-items. + * To explain the concept of items and sub-items, think of it as items + * are displayed in the first column and the sub-items in the following columns. */ class CustomListView extends QWidget { + protected $_onsubmit=null; + + protected $_jsonselectionchanged=null; + protected $_columns=array(); protected $_items=array(); + protected $_selectiontype=selSingle; + protected $_sortascending=1; + protected $_sortcolumnindex=-1; + + + + function __construct($aowner=null) + { + //Calls inherited constructor + parent::__construct($aowner); + + $this->Width=557; + $this->Height=314; + } + + /** + * Converts an array that contains strings into an array with ListColumn + * objects. convertPureArrayToColumns() is used after unserializing the + * values set by the object inspector. + * + * @param array $columnsarray The array that contains the strings. + * @return array Returns the array that contains the objects. + */ + function convertPureArrayToColumns($columnsarray) + { + $ret = array(); + if (is_array($columnsarray)) + { + foreach($columnsarray as $v) + { + // check if the value is an array that may contain column values + if (is_array($v)) + { + $lc = new ListColumn(); + + if (array_key_exists('Caption', $v)) + $lc->Caption = $v['Caption']; + + $ret[] = $lc; + } + // check if it is a just a plain string + else if (is_string($v)) + { + $lc = new ListColumn(); + $lc->Caption = $v; + $ret[] = $lc; + } + // check if it is already a ListColumn object + else if (is_object($v) && $v->classNameIs("ListColumn")) + { + $ret[] = $v; + } + } + } + return $ret; + } + + /** + * Converts a two-dimesional array into an array of ListItem objects. + * + * @param array $itemsarray Two-dimensional array of strings. + * @return array An array of ListItem objects. + */ + function convertPureArrayToItems($itemsarray) + { + $ret = array(); + if (is_array($itemsarray)) + { + foreach($itemsarray as $vItem) + { + // check if the value is an array that may contain item values + if (is_array($vItem)) + { + $li = new ListItem(); + $subitems = array(); + + // check if the $v array is a string array + foreach ($vItem as $vSubItem) + { + if (is_string($vSubItem)) + { + $subitems[] = $vSubItem; + } + } + + // first subitem is the caption of the ListItem + if (count($subitems) > 0) + { + // remove the first element and set the Caption property with it + $li->Caption = array_shift($subitems); + } + $li->SubItems = $subitems; + + $ret[] = $li; + } + // check if it is already a ListItem object + else if (is_object($vItem) && $vItem->classNameIs("ListItem")) + { + $ret[] = $vItem; + } + } + } + return $ret; + } + + function unserialize() + { + parent::unserialize(); + + // if not in design mode convert the array-columns and items into objects + if (($this->ControlState & csDesigning)!=csDesigning) + { + $this->_columns = $this->convertPureArrayToColumns($this->_columns); + $this->_items = $this->convertPureArrayToItems($this->_items); + } + } + + function loaded() + { + parent::loaded(); + + // get the SortColumnIndex submitted from the page + $submittedSortColumnIndex = $this->input->{"{$this->Name}SortColumnIndex"}; + if (is_object($submittedSortColumnIndex)) + { + $this->_sortcolumnindex = intval($submittedSortColumnIndex->asString()); + } + + // get the SortAscending submitted from the page + $submittedSortAscending = $this->input->{"{$this->Name}SortAscending"}; + if (is_object($submittedSortAscending)) + { + $this->_sortascending = ($submittedSortAscending->asString() == "true") ? 1 : 0; + } + + // get the selected items; it's a comma separated list of indices + $submittedSelectedItems = $this->input->{"{$this->Name}SelectedItems"}; + if (is_object($submittedSelectedItems)) + { + // make sure that the string is set otherwise explode() may + // return an array with one empty item is it + if (strlen($submittedSelectedItems->asString()) > 0) + { + // convert the string to an array + $arr = explode(',', $submittedSelectedItems->asString()); + + // set the selected state of each item + $index = 0; + foreach($this->_items as $item) + { + $item->Selected = in_array($index, $arr); + $index++; + } + } + } + } + + function init() + { + parent::init(); + + // this is only to check if the ListView was submitted + $submittedSelectedItems = $this->input->{"{$this->Name}SelectedItems"}; + if (is_object($submittedSelectedItems)) + { + // call OnSubmit after the items have been updated + $this->callEvent('onsubmit', array()); + } + } + function dumpContents() { + // add the hidden fields before we start with the output of the JS + echo "<input type=\"hidden\" name=\"{$this->Name}SelectedItems\" id=\"{$this->Name}SelectedItems\" value=\"\" />\n"; + echo "<input type=\"hidden\" name=\"{$this->Name}SortColumnIndex\" id=\"{$this->Name}SortColumnIndex\" value=\"$this->_sortcolumnindex\" />\n"; + echo "<input type=\"hidden\" name=\"{$this->Name}SortAscending\" id=\"{$this->Name}SortAscending\" value=\"".($this->_sortascending ? "1" : "0")."\" />\n"; + $this->dumpCommonContentsTop(); + if (($this->ControlState & csDesigning)!=csDesigning) + { + // redirect the form's OnSubmit JS event; save it first so the original + // event is not lost + echo " var {$this->Name}_formonsubmit = document.forms[0].onsubmit;\n"; + echo " document.forms[0].onsubmit = {$this->Name}UpdateProps;\n"; + } + $columns = array(); - while (list(, $column) = each($this->_columns)) + $cellrendertypes = array(); + // add the columns captions to the array + foreach ($this->_columns as $column) { - if (array_key_exists('Items', $item)) $title = $item['Title']; - else $title = ""; - - $columns[] = "\"$title\""; + $cre = creEdit; + if (is_object($column)) + { + // put the column caption in quotes + $columns[] = "\"".$column->Caption."\""; + $cre = $column->CellRenderType; + } + else if (is_string($column)) + { + $columns[] = "\"".$column."\""; + } + $cellrendertypes[] = $cre; } - $columns = array("\"M\"", "\"A\"", "\"Subject\"", "\"From\"", "\"Date\""); + // get the column index where the indices will be written to + $columnIndexOfIndices = count($columns); + // add the "Index" column; it will be hidden + $columns[] = "\"Index\""; echo " var columnData = [" . implode(",", $columns) . "];\n"; echo " var rowData = [];\n\n"; - echo " var now = new Date().getTime();\n"; - echo " var dateRange = 400 * 24 * 60 * 60 * 1000; // 400 days\n"; - echo " var date = new Date(now + Math.random() * dateRange - dateRange / 2);\n"; - echo " rowData.push([true, \"\", \"Subject 0\", \"Tester\", date]);\n"; - echo " var date = new Date(now + Math.random() * dateRange - dateRange / 2);\n"; - echo " rowData.push([false, \"\", \"Subject 1\", \"Developer\", date]);\n\n"; + // prepare an array that hold all indices that are selected + $selecteditemindices = array(); + // items are currently only available at run time + if (($this->ControlState & csDesigning)!=csDesigning) + { + foreach ($this->_items as $key => $item) + { + $row = array(); + // quote if the Caption is a string + $row[] = ($cellrendertypes[0] == creEdit) ? "\"".$item->Caption."\"" : $item->Caption; + + $index = 1; // $index at 0 is Caption + foreach ($item->SubItems as $subitem) + { + // quote if the sub item is a string + $row[] = ($cellrendertypes[$index] == creEdit) ? "\"".$subitem."\"" : $subitem; + $index++; + } + + // make sure the count of columns in this row do not exceed the one of $columns + while (count($row) > count($columns)) + { + array_pop($row); + } + + // add the the index of the current row + $row[] = $key; + + echo " rowData.push([" . implode(",", $row) . "]);\n"; + + if ($item->Selected) + { + $selecteditemindices[] = $key; + } + } + } + echo " var tableModel = new qx.ui.table.SimpleTableModel();\n"; echo " tableModel.setColumns(columnData);\n"; + echo " tableModel.setData(rowData);\n"; echo " var $this->Name = new qx.ui.table.Table(tableModel);\n"; + echo " var {$this->Name}_colmodel = $this->Name.getTableColumnModel();\n"; - echo " $this->Name.getTableColumnModel().setDataCellRenderer(0, new qx.ui.table.BooleanDataCellRenderer());\n"; -// echo " $this->Name.getTableColumnModel().setDataCellRenderer(1, new qx.ui.table.IconDataCellRenderer());\n"; - echo " $this->Name.getTableColumnModel().setColumnWidth(0, 20);\n"; - echo " $this->Name.getTableColumnModel().setColumnWidth(1, 20);\n"; + // add the columnIndexOfIndices to the Table object in JS + // so we later know it in the updateSelectedListViewItems() JS function + echo " $this->Name.columnIndexOfIndices = $columnIndexOfIndices;\n"; + // make sure this column of the indices is not visible + echo " {$this->Name}_colmodel.setColumnVisible($columnIndexOfIndices, false);\n"; - echo " tableModel.setData(rowData);\n"; + // currently only available at run time + if (($this->ControlState & csDesigning)!=csDesigning) + { + $index = 0; + // output the special column properties + foreach ($this->_columns as $column) + { + if ($column->Editable) + { + echo " tableModel.setColumnEditable($index, true);\n"; + } + if ($column->Width != -1) + { + $width = (is_int($column->Width)) ? $column->Width : "\"$column->Width\""; + echo " {$this->Name}_colmodel.setColumnWidth($index, $width);\n"; + } + // add the renderer (BooleanDataCellRenderer) if set + if ($column->CellRenderType == creBoolean) + { + echo " {$this->Name}_colmodel.setDataCellRenderer($index, new qx.ui.table.BooleanDataCellRenderer());\n"; + } + if (!$column->Visible) + { + echo " {$this->Name}_colmodel.setColumnVisible($index, false);\n"; + } + $index++; + } + } + + // if a sort column is set then sort the items acording to it; + if ($this->_sortcolumnindex > -1) + { + echo " tableModel.sortByColumn($this->_sortcolumnindex, ".($this->_sortascending ? "true" : "false").");\n"; + } + + // add the JS event if set + if ($this->_jsonselectionchanged != null) + { + echo " $this->Name.getSelectionModel().addEventListener(\"changeSelection\", $this->_jsonselectionchanged); \n"; + } + + // set the selection mode + $qxstr = "qx.ui.table.SelectionModel.SINGLE_SELECTION"; + switch ($this->_selectiontype) + { + case selNone: $qxstr = "qx.ui.table.SelectionModel.NO_SELECTION"; break; + case selSingle: $qxstr = "qx.ui.table.SelectionModel.SINGLE_SELECTION"; break; + case selOneInterval: $qxstr = "qx.ui.table.SelectionModel.SINGLE_INTERVAL_SELECTION"; break; + case selMultiInterval: $qxstr = "qx.ui.table.SelectionModel.MULTIPLE_INTERVAL_SELECTION"; break; + } + echo " $this->Name.getSelectionModel().setSelectionMode($qxstr); \n"; + + // set the selected items + sort($selecteditemindices); + echo " var selecteditemindices = [" . implode(",", $selecteditemindices) . "];\n"; + echo " var found;\n"; + echo " var ii;\n"; + echo " for (var i = 0; i < rowData.length; i++) { \n"; + echo " found = false;\n"; + echo " ii = 0;\n"; + echo " while (!found && ii < selecteditemindices.length) { \n"; + echo " found = (selecteditemindices[ii] == rowData[i][$columnIndexOfIndices]); \n"; + echo " ii++;\n"; + echo " }\n"; + echo " if (found) {\n"; + echo " $this->Name.getSelectionModel().addSelectionInterval(i, i); \n"; + echo " }\n"; + echo " }\n"; + + // output the rest of the common properties echo " $this->Name.setBorder(qx.renderer.border.BorderPresets.getInstance().shadow);\n"; - echo " $this->Name.setBackgroundColor(\"white\");\n"; + $color = ($this->_color != "") ? $this->_color : "white"; + echo " $this->Name.setBackgroundColor(\"$color\");\n"; echo " $this->Name.setLeft(0);\n"; echo " $this->Name.setTop(0);\n"; echo " $this->Name.setWidth($this->Width);\n"; @@ -102,59 +632,307 @@ __QLibrary_SetCursor($this->Name, $this->Cursor); + // allow the user of this component to add some customized JS code + $this->callEvent('onshow', array()); + $this->dumpCommonContentsBottom(); } - function __construct($aowner=null) + function dumpJavascript() { - //Calls inherited constructor - parent::__construct($aowner); + parent::dumpJavascript(); - $this->Width=557; - $this->Height=314; + // call the updateSelectedListViewItems within this javascript function + echo "function {$this->Name}UpdateProps() { \n" + ." var tableModel = $this->Name.getTableModel(); \n" + ." document.forms[0].{$this->Name}SortColumnIndex.value = tableModel.getSortColumnIndex(); \n" + ." document.forms[0].{$this->Name}SortAscending.value = tableModel.isSortAscending(); \n" + ." updateSelectedListViewItems($this->Name, document.forms[0].{$this->Name}SelectedItems); \n" + // call the original OnSubmit event if it exists + ." if(typeof({$this->Name}_formonsubmit) == 'function') \n" + ." {$this->Name}_formonsubmit(); \n" + ." return true; \n" + ."} \n\n"; + + // only write this function once; it can be used by other ListViews + if (!defined('updateSelectedListViewItems')) + { + define('updateSelectedListViewItems', 1); + + echo "function updateSelectedListViewItems(lv, hiddenfield) { \n" + ." var selectedRowData = []; \n" + ." var i = -1; \n" + ." var tableModel = lv.getTableModel(); \n" + ." lv.getSelectionModel().iterateSelection(function(index) { \n" + ." i = tableModel.getValue(lv.columnIndexOfIndices, index); \n" + ." selectedRowData.push(i); \n" + ." }); \n" + ." hiddenfield.value = selectedRowData.toString(); \n" + ."} \n\n"; + } } /** - * Describes the properties of the columns in the list view. This property - * is an array and contain the title, width and type for every column - * - * @return array Array holding column settings (Title, Width, Type) - */ - protected function readColumns() { return $this->_columns; } - protected function writeColumns($value) { $this->_columns=$value; } + * Adds a new column to the ListView. + * + * @param string $caption Title or caption of the column. + * @param mixed $width Please have a look at ListColumn::Width for + * further details about the allowed values. + * -1 indicates that no Width is set. + * @param enum(creEdit, creBoolean) $cellRenderType Defines how the cells of the column are rendered. + * @param bool $editable Indicates if the cells of the column are editable. + * If creBoolean is used editable should be set to false. + * @return ListColumn Returns the newly created and added ListColumn object. + */ + function addColumn($caption, $width = -1, $cellRenderType = creEdit, $editable = true) + { + $col = new ListColumn(); + $col->Caption = $caption; + $col->Width = $width; + $col->CellRenderType = $cellRenderType; + $col->Editable = $editable; + + $this->_columns[] = $col; + + return $col; + } + + /** + * Adds a new item/row to the ListView. + * The ListItem was modeled after VCL for Windows, meaning that there is + * a caption and subitems. The caption is used for the first column where + * the subitems are used for any further column. + * + * @param string $caption Caption of the item. + * @param array $subitems An array of strings used for the 2nd - x column. + * @param bool $selected Defines if the item/row is selected. + * @return ListItem Returns the newly created and added ListItem object. + */ + function addItem($caption, $subitems = array(), $selected = false) + { + $item = new ListItem(); + $item->ListView = $this; + $item->Caption = $caption; + $item->SubItems = (is_array($subitems)) ? $subitems : array(); + $item->Selected = $selected; + + $this->Items[] = $item; + + return $item; + } + + /** + * Delete an item by it's index. + * @param integer $index The index to delete. + */ + function deleteItem($index) + { + $items = $this->_items; + // reset the items + $this->_items = array(); + foreach($items as $key => $item) + { + // add all except item at $index + if ($key != $index) + { + $this->_items[] = $item; + } + } + } + + /** + * Deletes all the selected items. + */ + function deleteSelected() + { + $items = $this->_items; + // reset the items + $this->_items = array(); + foreach($items as $item) + { + // only add the unselected items + if (!$item->Selected) + { + $this->_items[] = $item; + } + } + } + + /** + * Removes the selection, leaving all items unselected. + */ + function clearSelected() + { + foreach($this->_items as $item) + { + $item->Selected = false; + } + } + + /** + * Selects all items. + */ + function selectAll() + { + foreach($this->_items as $item) + { + $item->Selected = true; + } + } + + /** + * Occurs when the form containing the control was submitted. + * @return mixed Returns the event handler or null if no handler is set. + */ + function readOnSubmit() { return $this->_onsubmit; } + /** + * Occurs when the form containing the control was submitted. + * @param mixed $value Event handler or null if no handler is set. + */ + function writeOnSubmit($value) { $this->_onsubmit=$value; } + function defaultOnSubmit() { return null; } + + /** + * JS event occurs when the selection of the list view was changed. + * @return mixed Returns the event handler or null if no handler is set. + */ + function readjsOnSelectionChanged() { return $this->_jsonselectionchanged; } + /** + * JS event occurs when the selection of the list view was changed. + * @param mixed $value Event handler or null if no handler is set. + */ + function writejsOnSelectionChanged($value) { $this->_jsonselectionchanged=$value; } + function defaultjsOnSelectionChanged() { return null; } + + + /** + * Describes the list of ListColumn objects used for the settings of the columns. + * @return array Array holding ListColumn objects + */ + function readColumns() { return $this->_columns; } + /** + * Describes the list of ListColumn objects used for the settings of the columns. + * @param array $value Array holding ListColumn objects + */ + function writeColumns($value) { $this->_columns=$value; } function defaultColumns() { return null; } /** - * Contains the list of items displayed by the list view. - * - * @return array Array of items - */ - protected function readItems() { return $this->_items; } - protected function writeItems($value) { $this->_items=$value; } + * Contains the list of items displayed by the list view. + * Use addItem(), deleteItem() to modify the array. + * @return array Array of items + */ + function readItems() { return $this->_items; } + /** + * Contains the list of items displayed by the list view. + * Use addItem(), deleteItem() to modify the array. + * @param array $value Array of items + */ + function writeItems($value) { $this->_items=$value; } function defaultItems() { return null; } + + /** + * SelectionType defines how the user can select the items in the ListView. + * Possible values are: + * selNone - No items can be selected. + * selSingle - Only a single item in th elist can be selected. + * selOneInterval - One interval can be selected. + * selMultiInterval - Multiple intervals can be selected. + * + * @return enum(selNone, selSingle, selOneInterval, selMultiInterval) + */ + function readSelectionType() { return $this->_selectiontype; } + /** + * SelectionType defines how the user can select the items in the ListView. + * Possible values are: + * selNone - No items can be selected. + * selSingle - Only a single item in th elist can be selected. + * selOneInterval - One interval can be selected. + * selMultiInterval - Multiple intervals can be selected. + * + * @param enum(selNone, selSingle, selOneInterval, selMultiInterval) $value + */ + function writeSelectionType($value) { $this->_selectiontype=$value; } + function defaultSelectionType() { return selSingle; } + + /** + * Indicates if the sorted column is in ascending order. If false, the + * items of the sorted column are in descending order. + * If no sorted column is set this property has no affect. + * @return bool + */ + function readSortAscending() { return $this->_sortascending; } + /** + * Indicates if the sorted column is in ascending order. If false, the + * items of the sorted column are in descending order. + * If no sorted column is set this property has no affect. + * @param bool $value + */ + function writeSortAscending($value) { $this->_sortascending=$value; } + function defaultSortAscending() { return 1; } + + /** + * Indicates the index of the column of the ListView that is sorted. The + * index starts at 0 for the first column. If SortColumnIndex is set to -1 + * no column is sorted. + * @return integer + */ + function readSortColumnIndex() { return $this->_sortcolumnindex; } + /** + * Indicates the index of the column of the ListView that is sorted. The + * index starts at 0 for the first column. If SortColumnIndex is set to -1 + * no column is sorted. + * @value integer $value + */ + function writeSortColumnIndex($value) { $this->_sortcolumnindex=$value; } + function defaultSortColumnIndex() { return -1; } + + } +/** +* Published properties of CustomListView. +*/ class ListView extends CustomListView { - //Publish common properties - function getVisible() { return $this->readVisible(); } - function setVisible($value) { $this->writeVisible($value); } + /* + * Publish the events for the component + */ + function getOnSubmit() { return $this->readOnSubmit(); } + function setOnSubmit($value) { $this->writeOnSubmit($value); } - // Publish properties + /* + * Publish the JS events for the component + */ + function getjsOnSelectionChanged() { return $this->readjsOnSelectionChanged(); } + function setjsOnSelectionChanged($value) { $this->writejsOnSelectionChanged($value); } + + /* + * Publish the properties for the component + */ + function getColor() { return $this->readColor(); } + function setColor($value) { $this->writeColor($value); } + function getColumns() { return $this->readColumns(); } function setColumns($value) { $this->writeColumns($value); } function getItems() { return $this->readItems(); } function setItems($value) { $this->writeItems($value); } - //function getColor() { return $this->readColor(); } - //function setColor($value) { $this->writeColor($value); } + function getParentColor() { return $this->readParentColor(); } + function setParentColor($value) { $this->writeParentColor($value); } - //function getFont() { return $this->readFont(); } - //function setFont($value) { $this->writeFont($value); } + function getSelectionType() { return $this->readSelectionType(); } + function setSelectionType($value) { $this->writeSelectionType($value); } - //function getParentFont() { return $this->readParentFont(); } - //function setParentFont($value) { $this->writeParentFont($value); } + function getSortAscending() { return $this->readSortAscending(); } + function setSortAscending($value) { $this->writeSortAscending($value); } + + function getSortColumnIndex() { return $this->readSortColumnIndex(); } + function setSortColumnIndex($value) { $this->writeSortColumnIndex($value); } + + function getVisible() { return $this->readVisible(); } + function setVisible($value) { $this->writeVisible($value); } } /** |
From: Rob W. <rob...@gm...> - 2007-06-21 17:24:41
|
Actually, did you apply the patch (not officially accepted) I sent in most recently. That was the same kind of stack trace I was getting whenever I loaded a page a second time in my app (i.e. after a button submission). The problem occured because I was dynamically creating components that weren't in the xml file. It's related to storing things in the session, and I think my solution solves the problem succesfully and hopefully makes Jose happy so he includes it. I haven't heard from Jose on the list in about a week now. -Rob On 6/21/07, Jonathan Benedicto <co...@jo...> wrote: > Hi All, > > Just run into a problem with the VCL and tables containing a field called > Name. > > If a table contains a field called "Name", when the page is serialized into > the PHP session, the table's Name field value is used to write out the name > of the component to the serialized stream. > > To see this problem in action, open the QuerySample in the > vcl\samples\DataAware\query, and set it to use a table that has a Name > field. Run the example, and hit the button. You should get a message: > > Application raised an exception class EPropertyNotFound with message 'Error > using a property, not defined as a member [QuerySample.Ships]' > Callstack #0 File: C:\Users\Jonathan\Downloads\querysample.php Line: 53 > |_Callstack #1 File: C:\Program Files (x86)\CodeGear\Delphi for > PHP\1.0\vcl\classes.inc.php Line: 1380 > |_Callstack #2 File: C:\Program Files (x86)\CodeGear\Delphi for > PHP\1.0\vcl\classes.inc.php Line: 1415 > > Jon > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > vcl4php-developers mailing list > vcl...@li... > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > -- Rob Wilkens http://RobWilkens.com 516-874-0579 |
From: Jonathan B. <co...@jo...> - 2007-06-21 17:02:58
|
Hi All, Just run into a problem with the VCL and tables containing a field called Name. If a table contains a field called "Name", when the page is serialized into the PHP session, the table's Name field value is used to write out the name of the component to the serialized stream. To see this problem in action, open the QuerySample in the vcl\samples\DataAware\query, and set it to use a table that has a Name field. Run the example, and hit the button. You should get a message: Application raised an exception class EPropertyNotFound with message 'Error using a property, not defined as a member [QuerySample.Ships]' Callstack #0 File: C:\Users\Jonathan\Downloads\querysample.php Line: 53 |_Callstack #1 File: C:\Program Files (x86)\CodeGear\Delphi for PHP\1.0\vcl\classes.inc.php Line: 1380 |_Callstack #2 File: C:\Program Files (x86)\CodeGear\Delphi for PHP\1.0\vcl\classes.inc.php Line: 1415 Jon |