Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Hiding Elements (Read 2271 times)
Kerinst
Member
*
Offline


If you can't do it right
lemme do it wrong for
you

Posts: 32
Location: North Dakota
Joined: Jun 3rd, 2004
Hiding Elements
Jun 29th, 2004 at 7:40pm
Print Post Print Post  
OK I think I even passed over this a few times in designer but isn't there a way to hide elements within a form, making them available to some but not to all??
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Hiding Elements
Reply #1 - Jun 29th, 2004 at 7:56pm
Print Post Print Post  
This should let only Fred see Elements 1 and 2.  They will be invisible to all other users.

Quote:
IF @USERID = "Fred" THEN {
     Visiblilty(Element1,1)
     Visiblilty(Element2,1)
}
     ELSE {
     Visibility(Element1,0)
     Visiblilty(Element2,0)
}
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Kerinst
Member
*
Offline


If you can't do it right
lemme do it wrong for
you

Posts: 32
Location: North Dakota
Joined: Jun 3rd, 2004
Re: Hiding Elements
Reply #2 - Jun 29th, 2004 at 8:20pm
Print Post Print Post  
THATS IT !!   Grin  I knew I saw something to that effect somewhere... now I just need to play around with adding pictures  Smiley
  
Back to top
 
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Hiding Elements
Reply #3 - Jun 30th, 2004 at 1:11am
Print Post Print Post  
That gave me an idea. I tried to speed up my database by 'hiding' some image fields if the user was "Speedy", but I still get a lag between records.

So it seems that even though an image field is hidden, the data for the photo still gets trasnferred to the client machine, thereby causing a lag.

I guess I'll just make a copy of the form and delete the image LE's and use it whenever I need to run mass updates and other stuff in a hurry.

Thanks for the ideas.

Steve
  
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Hiding Elements
Reply #4 - Jun 30th, 2004 at 1:56am
Print Post Print Post  
Just some thoughts, no code.......

Don't know if you did this if it would speed up, but its worth putting on the table for some feedback from Mark/Erika.

How about a duplicate of the form with the images.  The "non-image" form without would be the default form normally used. but add a button to see the image.  If button clicked, retreive only that one record in the other form.  A button on the "image" form, could close that form and return to the default "non-image" form.  Even better, what about an "image" form that only has only the image, none of the other fields?  Click on the button to have the image form pop up, close the image, and return to the default form.

Another option vs. an image form is to use @Shell and call up the image in an imager viewer instead.  Should be a separate resizable window.....I like that better,   hmmm.... ???   

Actually, after thinking about this, I think you should submit this as a new  topic.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Hiding Elements
Reply #5 - Jun 30th, 2004 at 5:27pm
Print Post Print Post  
Steve,

Just out of curiosity - how large are these images (in file size)? We have a 10/100 net here and can get a 10 Meg image through the net in about a second (usually - depending on traffic). A 10 Meg .jpg is much larger than a reasonable Sesame form.

One alternative you might consider is displaying a smaller version of the larger image file (like a thumbnail). Then if the user so selects, they can press a button to bring over the larger image to an unbound image LE controlled by SBasic. Don't forget to force a refresh.

Using an external image viewer probably won't help in that it will also have to transport the full image across the network connection.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Hiding Elements
Reply #6 - Jun 30th, 2004 at 5:54pm
Print Post Print Post  
Mark,

We have a form that is used to view 4 images that are all used on our website. The file sizes are all small (the largest .jpg is under 75kb, usually).

On our 10/100 network without about 4 other 'light' users working, it takes about 1 second to display all 4 images, which is fine but mass updates seems to pretty slow since the forms are waiting for the images to show up.

The real issue is when I try to work on this form from home over my internet connection (broadband at both ends). It may take 10 seconds to display each record.

We've found it VERY convenient to have a text LE just below our Image LE that shows the filename. I think I will place a command button by each image over 10kb that the user can use to display an image in the image box whenever desired. (I guess this is the same as unbinding the image LE that you and others have suggested. That should work well for me during mass updates.)

Thanks for the tips. I'll let you know how it goes!

Steve
  
Back to top
IP Logged
 
Kerinst
Member
*
Offline


If you can't do it right
lemme do it wrong for
you

Posts: 32
Location: North Dakota
Joined: Jun 3rd, 2004
Re: Hiding Elements
Reply #7 - Jun 30th, 2004 at 7:44pm
Print Post Print Post  
well I don't have to worry about pictures for work... this is just for a little database I wish to play with myself and would be highly off topic to deal with here
  
Back to top
 
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Hiding Elements
Reply #8 - Jul 19th, 2004 at 2:20pm
Print Post Print Post  
I finally got around to trying out the above suggestions to speed up our database. Unfortunately, the server keeps crashing. Here are the details:

I changed the image field (image1) lto a text field and then created an unbound image field called image2.

I put a command button to do the following:
image2=image1

I tested this on our LAN and it works great! Forceredraw() was not needed so I did'nt add it to the program.

I got home and connected to the office server and tried it. Advancing through the records was MUCH faster (THANKS Mark and Bob!), but when I pressed the button to show the image, the server crashes every time and usually gives the message "Runtime Error  R6025 -pure virtual function call.

Any thoughts? Would the command Forceredraw() help?

Thanks,
Steve
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Hiding Elements
Reply #9 - Jul 19th, 2004 at 3:06pm
Print Post Print Post  
Quote:
I tested this on our LAN and it works great! Forceredraw() was not needed so I did'nt add it to the program.


I take it from this statement that it works so long as you are running through an actual (read: high speed) network.

Quote:
I got home and connected to the office server and tried it. Advancing through the records was MUCH faster (THANKS Mark and Bob!), but when I pressed the button to show the image, the server crashes every time and usually gives the message "Runtime Error  R6025 -pure virtual function call.


But that on a slower (PPP-based) network it does not work?

Quote:
Any thoughts? Would the command Forceredraw() help?


Probably not - but there would be no harm in giving it a try. I'm guessing, but I suspect that this is a timing issue, wherein something is running on the image data before the image has made its way across the network.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Hiding Elements
Reply #10 - Jul 19th, 2004 at 3:39pm
Print Post Print Post  
Mark,

Since I am still using the original image fields (They are now just a different 'type') I can't imaging any programming would be causing a crash.

(For example, I may have on form exit programming such as: if @isblank(image1) then writeln("Photo is missing")

I'll review my programming tonight when I get home.

Thanks,
Steve
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Hiding Elements
Reply #11 - Jul 19th, 2004 at 4:34pm
Print Post Print Post  
Steve,

You don't need to review your program. I was referring to the programming that Sesame itself is made of. In other words, Sesame maybe accessing data in the image before it is ready, not your SBasic program. I can't be sure without some experimentation.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Hiding Elements
Reply #12 - Jul 19th, 2004 at 4:45pm
Print Post Print Post  
Oh OK.  Smiley

I'll wait to hear your results.

Thanks!

Steve

FYI - the form with the issue actually has 2 unbound image fields, one for a thumbnail (3-8 KB) and a detailed image (50-150 KB).

  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Hiding Elements
Reply #13 - Jul 19th, 2004 at 4:51pm
Print Post Print Post  
Steve,

I do still need confirmation that the technique is working if you are using a faster network (faster than dialup). Is that the case? It only fails if you are on a slow connection?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Hiding Elements
Reply #14 - Jul 19th, 2004 at 4:56pm
Print Post Print Post  
At work we use a 10/100 lan and the 'show image' button works perfectly. And makes mass updates MUCH faster!

At home I connect to the office via broadband at both ends. The bottleneck would be my upload from home at about 200kb. I never have connection problems using sesame from home to connect to office.

I have not used sesame over dialup.

I have noticed that when I press the "show image" button, the unbound image (thumbnail image) field turns white as if its trying to load, but the image does not appear. (Perhaps forceredraw would fix that). I believe the crash does not occur until I press f10 or f9. then the red "working" light flashes repeatedly, then stays red. THis is the point when the server crashes.

Thanks for your help. Let me know if I need to try some other things.

Steve
  
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print