return to "Browse" from "Find"?

Questions, answers, tips and ideas on Servoy Client

return to "Browse" from "Find"?

Postby NB » Sat Oct 29, 2005 11:06 pm

I'm actually using Developer but this seems like a "how to use Client" question:

If one presses Cmd "F" (I'm on Mac) to enter Find mode, and one simply wishes to cancel and go back to Browse mode, how is this done? I've tried Cmd-. ("cancel" on a Mac), Cmd-B (for "Browse"), Esc, and also tried pressing Cmd-F again figuring it might work like a "toggle combo" (like Cmd-L for going into Designer and then same keystroke for exitng Designer).

I'm sure the answer must be staring me in the face, Servoy seems too good a product to require one to enter a dummy Find (and thereby lose one's previous found set) as the only way to get out of Find mode ...

NB
NB
 
Posts: 29
Joined: Fri Oct 21, 2005 9:39 pm

Postby coulombre » Sun Oct 30, 2005 12:24 am

try F3...

Cheers,

Rich Coulombre
coulombre
 
Posts: 125
Joined: Wed May 28, 2003 4:56 pm
Location: Boston

Find Behavior

Postby gdurniak » Thu Mar 08, 2007 12:25 am

yes, a very good question

press F3, and you still lose the found set ( you find all )

is there any control here?

e.g. if none found, and you answer "no" to "modify find", I would like to either find none, or return to the original found set

thanks
greg
File Shoppe
gdurniak
 
Posts: 232
Joined: Thu Jul 08, 2004 7:25 pm
Location: Bayside, NY, USA

Re: Find Behavior

Postby Riccardino » Thu Mar 08, 2007 9:38 am

gdurniak wrote:yes, a very good question

press F3, and you still lose the found set ( you find all )

is there any control here?

e.g. if none found, and you answer "no" to "modify find", I would like to either find none, or return to the original found set



Didn't test it, but what about a method that duplicates the foundset and set the solution to reload it under certain conditions (attached to OnSearch property, for instance)? This way, you should be able to go back to previous state.
ciao, ric
User avatar
Riccardino
 
Posts: 911
Joined: Thu Apr 24, 2003 11:42 am
Location: Ferrara, Italy

Postby sanneke » Thu Mar 08, 2007 12:17 pm

I think the best way to handle this issue is to save de sql and the parameters which did get your foundset, save also the index so you return to the same record. Here you have the two methods.
The first one to save it before you enter the find mode and the second one to restore it after you did a find.

to save
Code: Select all
/******************************************

Purpose: to save a foundset in when entering a find and the user wants to cancel



******************************************/
globals.svy_sea_foundset = new Object()

globals.svy_sea_foundset.form = 'customers'

//  save the sql and parameters
globals.svy_sea_foundset.sql = databaseManager.getSQL(forms[globals.svy_sea_foundset.form].foundset)
globals.svy_sea_foundset.parameters = databaseManager.getSQLParameters(forms[globals.svy_sea_foundset.form].foundset)

//  save the index
globals.svy_sea_foundset.index = forms[globals.svy_sea_foundset.form].controller.getSelectedIndex()


to restore


Code: Select all

/******************************************

Purpose: to restore a saved foundset in case you enter a find and the user wants to cancel

Parameters: globals.svy_sea_foundset contains the form, sql, parameters and index

******************************************/

// 1 load all records
forms[globals.svy_sea_foundset.form].controller.loadAllRecords()

//2 load records on to form
forms[globals.svy_sea_foundset.form].controller.loadRecords(globals.svy_sea_foundset.sql,globals.svy_sea_foundset.parameters);

//3 set selected record.
forms[globals.svy_sea_foundset.form].controller.setSelectedIndex(globals.svy_sea_foundset.index)



Good luck!
Sanneke
Yield Software Development: Need help on your project?
yieldsd.com
User avatar
sanneke
 
Posts: 383
Joined: Thu Jun 15, 2006 9:20 am
Location: Amersfoort


Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 6 guests

cron