Page 3 of 4

PostPosted: Fri Aug 25, 2006 9:49 pm
by amcgilly
jcompagner,

Thanks. I have posted cases and sample solutions in the support system as you requested.

Does Servoy plan to offer the option of customizing the list paging controls in the web client. Those < << 1 2 3 >> > are OK for testing purposes but my clients will expect something more elegant.

Ideally I'd like to be able to specify icons (enabled & disabled) for the < << >> > controls, and perhaps specify a font for the page numbers, and specify the position of the controls relative to the list (left, centered, right).

Should I log this as a feature request?

PostPosted: Fri Aug 25, 2006 11:10 pm
by jcompagner
Adrian,

please log this as a feature request yes

PostPosted: Sat Aug 26, 2006 4:15 am
by rioba
Having problems with databaseManager.setAutoSave(false) - Servoy always saved the records, irrespective of AutoSave state - I checked the onRecordSave event, as suggested by Adrian's post. I am using rc2 on MacOS X 10.4.7, with a MySql 5.0.24 database.

When I move from one record to the next or the previous one, the onRecordSave event is fired as many times as the number of records in the foundset less 1: if there are 5 records, onRecordSave is activated 4 times by the same record, if the records are 4 it is fired 3 times and so on. When a new record is added the onRecordSave event is then fired once more and this for ANY record in the foundset I move from.

To check this I linked this method to the onRecordSave event of a form (i tried it with three different forms, same behaviour)

Code: Select all
var saveStatus = databaseManager.getAutoSave();
plugins.dialogs.showInfoDialog("","Save " + saveStatus + " " + tb_testid,"Ok");


where saveStatus var shows whether AutoSave is false or true and tb_testid is the id number of the record.

When I moved from record 21 (in a six records foundset) I got this message repeated 5 times: "Save false 21". When I moved from record 20 the message, again repeated 5 times, was "Save false 20", and so on.

To observe this behaviour you must move from one record to another after modifying one. In fact the first time you move through the records the onSave Record event is triggered just once, but if you move a few records up or down, voila...

Besides that, although AutoSave is set to false, modified records are always saved without issuing any save data command.

PostPosted: Sat Aug 26, 2006 7:20 am
by chartpacs
Hi Johan,

Thanks for letting me know about the list view problem.

I ran into a different problem with the debugger, but this particular problem is caused by user error :oops: For some reason I totally forgot I was still in debug mode, and I tried to do a find and replace within the method being debugged, and my Mac freaked out. It even made loud noises LOL. So I had to force quit Servoy.

Perhaps you could disable a lot of the menu items when in debug mode, and/or maybe beep if I hit command-F, for example?

PostPosted: Mon Aug 28, 2006 9:25 am
by faheemhameed
Hi there,

Code: Select all
application.getMethodTriggerElementName();
application.getMethodTriggerFormName();


When can I expect RC3 which fixes the above method to work properly in the debug mode.

Thanks!

PostPosted: Mon Aug 28, 2006 12:30 pm
by Jan Blok
pbakker wrote:Unfortunately, the Oracle issue reported in the release-notes of B3 is still there...

We just tested this on Oracle 10, and we found no problem whatsoever.
On which version of Oracle are you testing? do you use the correct driver?

PostPosted: Mon Aug 28, 2006 5:40 pm
by jcompagner
On another note: Why does a non editable image field have a "Save media" button? When clikcing on the button, nothing seems to happen anyway.


I thought a none editable field should be able to save the picture.
(that you can't do that is a bug)
But i can remove that picture all together?

But both pictures gone is more disabled (can't download and upload) and readonly is just as a text field you can copy out if it but not in in..

PostPosted: Mon Aug 28, 2006 5:43 pm
by jcompagner
Sean,

please make a feature request for this in our support system (disabling as much as possible when debugging)

PostPosted: Mon Aug 28, 2006 5:48 pm
by jcompagner
rioba,

are you sure the records are really saved (to the db)???

as i said before i think in this thread (or could be somewhere else) the onRecordSave event is triggered yes. But the record is not really saved to the database. It is stored for later saving.

onRecordSave is more a recordStoppedEditing event in this case (with outsave to false)

I already tried to reproduce the multiply events firing in with one move. But couldn't get that reproduced. In what view do you see that (record view/listview or tableview) and how do you go to the next record?

PostPosted: Tue Aug 29, 2006 12:18 am
by rioba
jcompagner wrote

are you sure the records are really saved (to the db)???

I created a new solution, based on the same table of the previous one, where all records were deleted. You are right: the new records were not saved to the database, although one could not know. I modified them a few times, and the changes were maintained when moving from one record to another. But they were never written to the database. Just once one record was saved but I don't know how because in the form there is no save button.

After restarting Servoy, the non saved records were gone. At this point, how can one know that a record has been saved or not?

already tried to reproduce the multiply events firing in with one move. But couldn't get that reproduced.

The multiple onRecordSave events could instead be reproduced. This has been done while in record view and it has been triggered either by moving from one record to the next or the previous using the keystroke combination (alt arrow on a Mac) or using the menu commands. This behaviour can be observed also when a new record is created. And I can confirm that the method is fired as many times as the number of records in the foundset: if you add a new record the method is fired once more and so on.

Servoy 3.0rc2
MacOS X 10.4.7
MySQL 5.0.24

PostPosted: Tue Aug 29, 2006 12:36 am
by amcgilly
Johan,

I uploaded case 49157 several days ago that shows how to reproduce the onRecordSave event firing too often. Have you not been able to reproduce it using that?

I have also had the experience that rioba described where the onRecordSave event was firing as many times as there were records in the foundset, although I wasn't able to reproduce it reliably so I didn't report it.

PostPosted: Tue Aug 29, 2006 12:38 am
by amcgilly
Regarding this discussion about whether or not the record is being saved when onRecordSave returns false: we need the ability to prevent INVALID DATA from being saved ANYWHERE, PERIOD. It doesn't help us if the invalid data is saved to the foundset but not in the backend - this only confuses matters, as we have just seen.

Can you make it so it doesn't save to the foundset OR the db if onRecordSave returns false?

PostPosted: Tue Aug 29, 2006 10:19 am
by jcompagner
Adrian,

i will look at your case today.

a record saved or not will always be in the foundset.. There is no other way around that, there is no such thing as saving to a foundset. only saving to the database.

PostPosted: Wed Aug 30, 2006 3:49 am
by amcgilly
Johan,

OK, I get it. What you say makes perfect sense.

What I was hoping for was the option to easily revert to the saved version of a record after it's been modified (not saved) but failed validation. I guess I'll have to continue to code such reversions myself. No problem. Thanks.

PostPosted: Wed Aug 30, 2006 6:16 am
by chartpacs
I have a few minor GUI issues to report. I'd post screenshots but I don't seem to have that capability right now.

1) In the Define Valuelist dialog, the field for Valuelist Name isn't tall enough. Letters like "gyjq" get cut off.

2) In the same dialog, the bottom of the "Allow empty value" checkbox is cut off.

3) If a combobox field is non-editable, I can quickly navigate to list items by typing a letter. I can't do this if the field is editable.