Normal Topic Problem with @SelectTreeItem (Read 1081 times)
wase
Junior Member
**
Offline


Always looking for a good
code

Posts: 57
Location: Austria
Joined: Jun 22nd, 2004
Problem with @SelectTreeItem
Feb 15th, 2006 at 4:18pm
Print Post Print Post  
hello
i have a problem with the usage of the @SelectTree Item
when i type in the following code the TreeItem is typed red (usualy black) but it does not work.
when i write out the vNav variable i get 1 so it should work.
after the programming there is the Search/Update menue and the Add Data menue opend. the active menue is the Add Data.

[code]
vNav = @SelectTreeItem("Add Data Menu!Navigation!Close Form Without Saving (Esc)")
[/code]

Another question
is it possible to open the sesame database manager with a programmable width and hight
other windows programs save the last window width and hight and the position on the screen
so maybe it is possible with sesame

hope for answer
sebastian
  
Back to top
ICQ ICQ  
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Problem with @SelectTreeItem
Reply #1 - Feb 15th, 2006 at 4:35pm
Print Post Print Post  
Hello Sebastian,

@SelectTreeItem() can not be used to close a form that is currently open. To close a form you will want to call @Exit. @Exit is on page 167-168 of the Sesame 1.1 Programming Guide.

The Next Major version has the capability to control the Width, Height, X and Y coordinates of the Sesame window.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
wase
Junior Member
**
Offline


Always looking for a good
code

Posts: 57
Location: Austria
Joined: Jun 22nd, 2004
Re: Problem with @SelectTreeItem
Reply #2 - Feb 15th, 2006 at 4:41pm
Print Post Print Post  
hello ray

i tried the @exit command and it closed the not active search/update window but the Add Data window is still active

when i try to use the @exit twice there is no reaction.
  
Back to top
ICQ ICQ  
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Problem with @SelectTreeItem
Reply #3 - Feb 15th, 2006 at 5:39pm
Print Post Print Post  
Hello Sebastian,

@Exit will close the current form with focus. Do you have any other programming running?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
wase
Junior Member
**
Offline


Always looking for a good
code

Posts: 57
Location: Austria
Joined: Jun 22nd, 2004
Re: Problem with @SelectTreeItem
Reply #4 - Feb 15th, 2006 at 5:55pm
Print Post Print Post  
in detail:

i open the form, search for entries, delete them,
switch to add data mode (Ctrl F6) and add entries with complex programming (read out from file into Array, work with array and write the array in the form and subform)
at the end of the programming there are  the main window, search/update window and the add data window opend.
now i put in the @ exit at the end of the programming and the search/update window closes but there is another add data window opend with zero entries in the add data counter (satus bar) but there have been 30 entries added.

  
Back to top
ICQ ICQ  
IP Logged
 
wase
Junior Member
**
Offline


Always looking for a good
code

Posts: 57
Location: Austria
Joined: Jun 22nd, 2004
Re: Problem with @SelectTreeItem
Reply #5 - Feb 15th, 2006 at 7:23pm
Print Post Print Post  
hello again
i just tried it with a very simple program
i put one text field (test) and one button (execute) on the form and in the form is the following programming on the execute button

Code
Select All
var vnav as int
	vNav = @SelectTreeItem("Search Menu!Search Commands!Retrieve New Results (F10)")
	vNav = @SelectTreeItem("Search Update Menu!Results Commands!Mass Delete")
	vNav = @SelectTreeItem("Search Update Menu!Navigation!Switch to Add Data Mode (CTRL-F6)")
test = "inserted text"
@save

@exit
 



i put some records in the form and saved them
if i now change to the search/update menue and press the button all records should be deleted and one record should be inserted.
after that the seach/update window and the add data window should close but only the search/update closes

this is exactly my problem
  
Back to top
ICQ ICQ  
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Problem with @SelectTreeItem
Reply #6 - Feb 15th, 2006 at 7:47pm
Print Post Print Post  
Hello Sebastian,

The following three lines of code are running on the Search/Update form as it it the form who's programming is currently running.

Code
Select All
test = "inserted text"
@save

@exit  



Why do you need to switch to Add Data mode to add the new records? New records can be added in Search Update mode, In fact your code is currently adding them in Search/Update. This is why the Record Counter in Add Data says 0 of 0, because all the records were added in Search/Update.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
wase
Junior Member
**
Offline


Always looking for a good
code

Posts: 57
Location: Austria
Joined: Jun 22nd, 2004
Re: Problem with @SelectTreeItem
Reply #7 - Feb 16th, 2006 at 10:05am
Print Post Print Post  
hi

how could i insert data in the search/update mode when there are no more entries in there.

if i try to use the command @CreateNewRecord() sesame hangs up
but if i try it in another way like
Code
Select All
var vnav as int
var nn as int
      vNav = @SelectTreeItem("Search Menu!Search Commands!Retrieve New Results (F10)")
      vNav = @SelectTreeItem("Search Update Menu!Results Commands!Mass Delete")
@exit

      vNav = @SelectTreeItem("NewSesameApplication!Forms!Add Data!NewDatabase!NewForm")  
test = "eigefügter Text"
@save

@exit
 


i also get a open add data window with 0 records but the one in the programmin was inserted.

if i try the way with a macro which closes the db and opens another db i get a error executing the macro
when i press ok it opens the other db and sesame hangs up

Code
Select All
var vnav as int
var nn as int
	vNav = @SelectTreeItem("Search Menu!Search Commands!Retrieve New Results (F10)")
	vNav = @SelectTreeItem("Search Update Menu!Results Commands!Mass Delete")
@exit

	vNav = @SelectTreeItem("NewSesameApplication!Forms!Add Data!NewDatabase!NewForm")

test = "eigefügter Text"

@save
@deferredMacro("E:\sesame\data\programmierung\backToMainMenue.mac")
 


sebastian
  
Back to top
ICQ ICQ  
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Problem with @SelectTreeItem
Reply #8 - Feb 16th, 2006 at 3:41pm
Print Post Print Post  
Hello Sebastian,

Try this code. It does not need to open Add Data but yet 4 records are added to the database.
Code
Select All
var vNav as int

	vNav = @SelectTreeItem("Search Menu!Search Commands!Retrieve New Results (F10)")
	vNav = @SelectTreeItem("Search Update Menu!Results Commands!Mass Delete")
test = "Test Record Number 1"
@save
test = "Test Record Number 2"
@save
test = "Test Record Number 3"
@save
test = "Test Record Number 4"
@save
@exit 



Records can be added in Search/Update even if there are no current records in there.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
wase
Junior Member
**
Offline


Always looking for a good
code

Posts: 57
Location: Austria
Joined: Jun 22nd, 2004
Re: Problem with @SelectTreeItem
Reply #9 - Feb 16th, 2006 at 7:41pm
Print Post Print Post  
so simple and so effective

thanks very much ray

sebastian
  
Back to top
ICQ ICQ  
IP Logged