Integrated Application Platform › Forums › General › suneido:/eval?
- This topic has 5 replies, 2 voices, and was last updated 12 years ago by amckinlay.
May 6, 2011 at 11:11 pm #698
I know that BrowserControl uses SuneidoApp to scan for “suneido:/eval?” prefixes. But sometimes I need to use MshtmlControl, to use the Set option to insert HTML code directly, not via a URL. However it seems that MshtmlControl does not react to any “suneido:/eval?” prefixes in the code. How can I solve this? The workaround I use now is to put the HTML code in a file (PutFile) and then to use the URL in BrowserControl, but I think this is a bit ugly solution.May 6, 2011 at 11:35 pm #840
The current SuneidoAPP is specific to getting the HTML from database tables (‘books”) but you could make your own version of SuneidoAPP that got the HTML code from somewhere else, e.g. from calling a function.
It could work like HttpServer and use some kind of “map” (or “routing”) that specified what functions (or classes) to call for different url’s. Or you could simply take the first part of the url as a the name of a function/class to call.
NOTE: letting url’s specify any function to call is dangerous – you would only want to do that in a “trusted” environment.May 7, 2011 at 7:40 pm #841
Actually in a previous version I would use href’s to open a file, after the user selects a file to open. The file is prepared to be in the users temp directory. This works, I only need to put in a normal href, pointing to the file. Issue is that in that case all the files (attachments in a email) need to be prepared before the email can be shown. This works for a small number of attachments, not for a large number of attachments. In that case after selecting the email, the user is presented with a long delay, during which the application is not responding. So I was looking for a way to prepare the attachment after selection, so the delays for the user would be more acceptable. You are right that it is not a safe way to do with a function call inside a href. Maybe I should go back to the previous solution and use Thread() to solve the non-responsiveness of the application. Problem is I don’t know how much I can trust the Thread() option. Any tips?May 8, 2011 at 10:44 pm #842
You could give Thread a try. It works most of the time. I just haven’t figured out what specific situations it doesn’t handle.
Can’t think of better answers.
Sorry for the delay in replying – I’m travelling.May 9, 2011 at 3:10 pm #843
Thanks for the tip. I will take a look at it. For the time being I have used a HorzControl and Html_ahref_Control for a list of attachments and changed LBUTTONUP(). This way I can just get the attachment data from the email at the moment the user needs it. Works fine and no delays with large collections of attachments. Only downside is the use of the HorzControl with the links in it. If the list of attachments is large, it is difficult to display it, because of the space limits. That is actually why I wanted to use the BrowserControl, because then I can just put all attachment links in 1 or more lines on the screen. I am trying to do something like that with HorzControl, making it “wrap around”, but have not idea yet how to do that. Is there a control that can do something like that?May 9, 2011 at 11:01 pm #844
I don’t think there’s a control that will wrap other controls. Sounds reasonable though and not too hard.
You could use a Scroll control. That might be better with Vert.
- You must be logged in to reply to this topic.