Forums › Forums › Superbase NG Personal › Form and Detail Block oddities
- This topic has 3 replies, 2 voices, and was last updated 12 years, 9 months ago by Dan Jinks.
- AuthorPosts
- July 15, 2011 at 3:43 pm #117Dan JinksParticipant
I have a few observations on building Forms and Detail Blocks that might help others: 1. Build a Form, from scratch, completely in the SIMPOL Forms Designer and store that form in the SIMPOL directories. It will be hidden from the operating system. See these screen shots: http://www.jinksinc.com/Downloads/Projects-%20SIMPOL%20Personal.png http://www.jinksinc.com/Downloads/Projects-%20Win7.png I was able to reproduce this condition a second time. I was also able to save the form, into another directory under Program Files {x86) and the form stayed hidden from the operating system explorer, but SIMPOL Personal could still find it. I can make the form visible to the my OS by copying it to a folder external to Program Files {x86), using the SIMPOL File -> Open ->Form dialog a. Right-click the SXF form b. Select copy c.Navigate to a new folder using the dialog’s left navigation pane d. Right-click white space in the selected folder’s right pane e. Select paste f. Cancel the dialog 2. Sort fields work on form detail blocks, However, if the form is saved with a sort field assigned, SIMPOL Personal will crash (close) when you attempt to reopen the form. I’m pretty sure your application will also crash (close). You can get around this by setting the sort field programmatically in your application, but never saving it in the form. Likewise in SIMPOL Personal, who can set the sortfield in Forms Designer but not save the form and use the form fine in SIMPOL Personal. If you save the form with the sortfield assigned, you will not be able to use the form again until you change two items in the SXF file. Open the SXF file in a text editor, find search for the “
somefieldname to 3. I cannot get detail blocks to sort descending. They always sort ascending. July 15, 2011 at 4:17 pm #1886Dan JinksParticipantAnother issue I discovered is if you try to remove the file link to a
detail block in Forms Designer, then save the form, Forms Designer
closes and the saved form is corrupt. I needed to create an unlinked
detail block so I can use a query to fill the detail block.
To remove the Master file link safely,1. Open the form in a text editor. Find this section:
<childlinks>
<sdf1link id="1">
<sourcefield>Last_First</sourcefield>
<sourcetable>CONTACTS</sourcetable>
<targetfield>Last_First</targetfield>
<targettable>CONXNOTE</targettable>
</sdf1link>
</childlinks>2. Remove everything within between <childlinks> and </childlinks>
3. Find the detailblock definition:
<sdf1detailblock scrollbartype="right" tabacross="1" sort="1"
sortascending="0" masterlinkid="1">4. change masterlinfid="0"
5. Save the file
-Dan
On 7/15/2011 11:43 AM, djinks wrote:
> I have a few observations on building Forms and Detail Blocks that might
> help others:
>
> 1. Build a Form, from scratch, completely in the SIMPOL Forms Designer
> and store that form in the SIMPOL directories. It will be hidden from
> the operating system. See these screen shots:
> http://www.jinksinc.com/Downloads/Projects-%20SIMPOL%20Personal.png
> http://www.jinksinc.com/Downloads/Projects-%20Win7.png
>
> I was able to reproduce this condition a second time. I was also able to
> save the form, into another directory under Program Files {x86) and the
> form stayed hidden from the operating system explorer, but SIMPOL
> Personal could still find it. I can make the form visible to the my OS
> by copying it to a folder external to Program Files {x86), using the
> SIMPOL File -> Open ->Form dialog
> a. Right-click the SXF form
> b. Select copy
> c.Navigate to a new folder using the dialog's left navigation pane
> d. Right-click white space in the selected folder's right pane
> e. Select paste
> f. Cancel the dialog
>
> 2. Sort fields work on form detail blocks, However, if the form is saved
> with a sort field assigned, SIMPOL Personal will crash (close) when you
> attempt to reopen the form. I'm pretty sure your application will also
> crash (close). You can get around this by setting the sort field
> programmatically in your application, but never saving it in the form.
> Likewise in SIMPOL Personal, who can set the sortfield in Forms Designer
> but not save the form and use the form fine in SIMPOL Personal.
>
> If you save the form with the sortfield assigned, you will not be able
> to use the form again until you change two items in the SXF file. Open
> the SXF file in a text editor, find search for the "<sdf1detailblock"
> then find and
> – change sort="1" to sort="0"
> – change <sortfield>somefieldname</sortfield> to <sortfield></sortfield>
>
> 3. I cannot get detail blocks to sort descending. They always sort
> ascending.July 18, 2011 at 9:32 pm #1887MichaelKeymasterOn 15/07/2011 16:43, djinks wrote:
> I have a few observations on building Forms and Detail Blocks that
> might help others:
>
> 1. Build a Form, from scratch, completely in the SIMPOL Forms
> Designer and store that form in the SIMPOL directories. It will be
> hidden from the operating system. See these screen shots:
> http://www.jinksinc.com/Downloads/Projects-%20SIMPOL%20Personal.png
> http://www.jinksinc.com/Downloads/Projects-%20Win7.png
>
> I was able to reproduce this condition a second time. I was also able
> to save the form, into another directory under Program Files {x86)
> and the form stayed hidden from the operating system explorer, but
> SIMPOL Personal could still find it. I can make the form visible to
> the my OS by copying it to a folder external to Program Files {x86),
> using the SIMPOL File -> Open ->Form dialog a. Right-click the SXF
> form b. Select copy c.Navigate to a new folder using the dialog's
> left navigation pane d. Right-click white space in the selected
> folder's right pane e. Select paste f. Cancel the dialogThis is a problem with doing anything under the Program Files directory.
IN the next release I am goiing to move all the samples, projects,
include files, libs, etc. all into the c:publicsimpol directory. What
you are seeing is the special protection of the "Program Files"
directory that was added with Vista. The actual files are not stored in
that directory. Instead of there, they are stored in:%userdir%AppDatalocalVirtualStoreProgram Filessimpol…
Lookup virtualization and vist in Google for more information. It makes
deploying commercial applications much more difficult nowadays. You also
can't write to the HKEY_LOCAL_MACHINE either. Both are only accessible
with a special elevated security privileges token.> 2. Sort fields work on form detail blocks, However, if the form is
> saved with a sort field assigned, SIMPOL Personal will crash (close)
> when you attempt to reopen the form. I'm pretty sure your
> application will also crash (close). You can get around this by
> setting the sort field programmatically in your application, but
> never saving it in the form. Likewise in SIMPOL Personal, who can set
> the sortfield in Forms Designer but not save the form and use the
> form fine in SIMPOL Personal.
>
> If you save the form with the sortfield assigned, you will not be
> able to use the form again until you change two items in the SXF
> file. Open the SXF file in a text editor, find search for the
> "<sdf1detailblock" then find and – change sort="1" to sort="0" –
> change <sortfield>somefieldname</sortfield> to
> <sortfield></sortfield>I will have a look. This is probably a problem in the formlib.sml
project, which is responsible for loading the form and creating the objects.> 3. I cannot get detail blocks to sort descending. They always sort
> ascending.That should work ok. I use it. What is your order clause?
Ciao, Neil
July 19, 2011 at 4:28 am #1896Dan JinksParticipantHi Neil,
Thanks for your response.
l have not tried to sorting my detailblock descending in my app, but in
the forms designer I tried several fields, all of which sort ascending only.
http://www.jinksinc.com/Downloads/NotesDetailblock.png
http://www.jinksinc.com/Downloads/NotesDetailblockSortOrder.png
-DanOn 7/18/2011 5:32 PM, Neil Robinson wrote:
>> 3. I cannot get detail blocks to sort descending. They always sort
>> ascending.
>
> That should work ok. I use it. What is your order clause?
>
> Ciao, Neil - AuthorPosts
- You must be logged in to reply to this topic.