Forum Replies Created
- AuthorPosts
- Jean ValleeParticipant
Came up with the answer finally. You have to lie to Word by telling it
it is already saved.wxautomation1var.putproperty(property="Saved",error=e,"True")
Then you can close and it will not save your changes.
Jean
On 10/4/2013 3:03 PM, JV wrote:
> Anyone trying to automate MS Word thru wxautomation successfully?
> Got all working (thanks Ian!) except for syntax to close a document
> without saving.
> Any ideas will be greatly appreciated.
> Jean ValleeJean ValleeParticipantOn 6/26/2013 2:41 PM, JV wrote:
> I am using Shellexecute to call the user's default email program and
> insert the usual.. to subject etc.
> The msg I want to send is too long for the shellexecute parameter so I
> just want to copy the text to the clipboard and paste into the email.
> The problem is:I have no idea what email program shellexecute will call.
> Once I know I can use appactivate and paste.
> I know the default email client program name is store in the registry
> under HKLMSOFTWAREClientsMail in the (Default) key.
> Anyone have any code snippets for win32_registry to read the value of a
> key in the registry?
>
> Jean Vallee
I gave up trying to find out…
What I ended up doing was calling shellexecute with open and
constructing a string as the second parameter:"mailto:" + cr!CntrDFon+ "?subject=" +"Address:%20" +
me!jobaddr.control.text + "%20Permit%20#:%20" + me!inspptno.control.text
+ " Insp%20#:%20"+me!inspnum.control.textAny spaces must be sent as urlencode characters (%20 = space)
The shellexecute make the mail program the active app and put the cursor
into the body, so I copied the text I wanted from the record to the
clipboard and pasted.
Then it's up to the user to make any changes they want and send.Jean ValleeParticipantOn 6/7/2013 9:22 AM, Neil Robinson wrote:
> On 06/06/2013 19:33, kromkowski wrote:
>> Is it possible to store and use Google Drive for SIMPOL data?
>>
>
> I wouldn't recommend it. It is based on file copying.
>
> Ciao, Neil
I use it as a secondary backup only!
Jean ValleeJean ValleeParticipantOn 5/20/2013 3:02 PM, Neil Robinson wrote:
> On 17/05/2013 19:49, JV wrote:
>> On 5/15/2013 10:21 PM, JV wrote:
>>> Am slowly making progress in getting my ppcs server and app running but
>>> I am a db programmer and do not speak ip with any expertise.
>>>
>>> Simpol expects you to supply the ip address of the server so it know
>>> where the tables are.
>>>
>>> Since most times, I am shipping an installation CD, I will have no idea
>>> what the ip address will be. And because my users are well, users, and
>>> not server admins, they may not know either.
>>>
>>> Anyone have a code snippet (even one from SB) that I can use to look for
>>> the PPCS server and get its ip address to pass to the opendatasource
>>> command?
>>>
>>> Jean Vallee
>> Nevermind, I'm just going to insist they know this info and fill in
>> dialog and store it the info in a text file before proceeding.
>>
>
> This makes the most sense. All they need to do is to open a command prompt by running cmd, and then type in ipconfig to see what
> their ip address is.
>
> Ciao, Neil
Sounds simple to you and me… but to my users.. they don't have a clue
what that means. command prompt, ipconfig might as well be a foreign
language they do not speak.Jean ValleeParticipantOn 5/15/2013 10:21 PM, JV wrote:
> Am slowly making progress in getting my ppcs server and app running but
> I am a db programmer and do not speak ip with any expertise.
>
> Simpol expects you to supply the ip address of the server so it know
> where the tables are.
>
> Since most times, I am shipping an installation CD, I will have no idea
> what the ip address will be. And because my users are well, users, and
> not server admins, they may not know either.
>
> Anyone have a code snippet (even one from SB) that I can use to look for
> the PPCS server and get its ip address to pass to the opendatasource
> command?
>
> Jean Vallee
Nevermind, I'm just going to insist they know this info and fill in
dialog and store it the info in a text file before proceeding.Jean ValleeParticipantOn 5/14/2013 10:53 AM, kromkowski wrote:
> On 05/13/13 8:34 AM, JV wrote:
>> On 5/13/2013 5:15 AM, Ian Macpherson wrote:
>>> Hi Jean
>>> I'm more or less at the same stage as you wanting to run a PPCS
>>> server to
>>> see how things run.
>>> I got the file sharing cfg file etc going with simpolserver.exe but NOT
>>> with the guisimpolserver ( this gave me an error message … can't
>>> remeber
>>> as was about a month ago)
>>> Told Neil& he said there was a problem with the guisimpolserver&
>>> that it
>>> would be treated in the next release. Can't say more for the moment.
>>> Hope this info helps All the best Ian macpherson
>>>
>> I have a customer who expects to go live THIS WEEK. This is not good at
>> all.
>> I have 1500 hours and 60000 line of code in my conversion and need
>> working tools. I keep running into limits and it's very frustrating.
>>
>> Jean
>
> Some of the problems with guisimpolserver are noted in a March 2012 post.
>
> I hope he replies in this newsgroup. Pre-application framework, I had
> gotten a crude program working over a network but I've forgotten how I
> did it over the last 3 years or so. I am basically at the stage to move
> from completely SB to Simpol, but not having the time to work through
> exactly how one sets this up has been an easy procrastination technique
> for me.I have the guisimpolserver up and running with Neil's assistance (But
NOT FULLY TESTED YET) I will be posting what files are needed and what
are the "gotcha's" when I take a breather next week after I get this
client off my back.Jean ValleeParticipantOn 5/13/2013 5:15 AM, Ian Macpherson wrote:
> Hi Jean
> I'm more or less at the same stage as you wanting to run a PPCS server to
> see how things run.
> I got the file sharing cfg file etc going with simpolserver.exe but NOT
> with the guisimpolserver ( this gave me an error message … can't remeber
> as was about a month ago)
> Told Neil& he said there was a problem with the guisimpolserver& that it
> would be treated in the next release. Can't say more for the moment.
> Hope this info helps All the best Ian macpherson
>
I have a customer who expects to go live THIS WEEK. This is not good at
all.
I have 1500 hours and 60000 line of code in my conversion and need
working tools. I keep running into limits and it's very frustrating.Jean
Jean ValleeParticipantOn 5/6/2013 11:00 AM, Jean Vallee wrote:
> String and integer values are not the problem. I'm setting the status bar
> to show them as needed.
> What I need are objects, things I need detail for.
>
> Have I overwhelmed the IDE?
>
> My compiled project file is only 726K and I'm not nearly done!
>
> Jean
>
and yes I'm running the latest. Is there not something I can do???Jean ValleeParticipantString and integer values are not the problem. I'm setting the status bar
to show them as needed.
What I need are objects, things I need detail for.Have I overwhelmed the IDE?
My compiled project file is only 726K and I'm not nearly done!
Jean
Jean ValleeParticipantOn 5/2/2013 2:26 PM, JV wrote:
> On 5/2/2013 1:21 PM, Neil Robinson wrote:
>> On 02/05/2013 16:24, JV wrote:
>>> On 5/1/2013 7:07 PM, JV wrote:
>>>> On 5/1/2013 1:05 PM, JV wrote:
>>>>> Suddenly I'm finding myself flying blind.
>>>>> Watch window is not showing any values.
>>>>> window flashes like it's being updated when I step thru code.
>>>>> I rebooted already
>>>>> How do I get it back?
>>>>>
>>>>> Jean
>>>> I reinstalled 1.74 and still nothing. HELP!
>>> And just as sudden it's fine…
>>> Jean
>>>
>>
>> You always need to check the Thread Manager. You may not be debugging
>> on the correct thread.
>>
>> Ciao, Neil
>
> I should have mentioned that I already checked that. Only 1 thread
> running. If I had more than 1 I could not step thru code if I was on the
> wrong one, correct?
>
> But now the problem is intermittent. Sometimes it displays values and
> sometimes not. I need to see what it thinks a value is since I disagree
> with it.
>
> Jean
>
This is getting urgent. I get values when I step thru main but nothing
beyond that unless I'm stepping thru a library. Then I get me values.No local values being shown. Any ideas on how to fix this?
JeanJean ValleeParticipantOn 5/2/2013 1:15 PM, Neil Robinson wrote:
> On 30/04/2013 17:48, JV wrote:
>> On 4/30/2013 9:30 AM, Neil Robinson wrote:
>>> On 30/04/2013 04:23, JV wrote:
>>>> On 4/29/2013 1:43 PM, Neil Robinson wrote:
>>>>> On 28/04/2013 16:55, JV wrote:
>>>>>> How do I set this property?
>>>>>> appw.form.currentpage.wxformpage.focuscontrol.name
>>>>>>
>>>>>> It's read only….
>>>>>>
>>>>>> I'm trying to shift focus to another field before calling a getuserinput
>>>>>> called from a dataform1button with an ongotfocus event.
>>>>>>
>>>>>> Per a previous thread, I know I have to change the focus prior to
>>>>>> calling getuserinput but nothing I've tried changes the
>>>>>> focuscontrol.name property so getuserinput is being called over and over.
>>>>>
>>>>> To set focus to another control, use control.setfocus().
>>>>>
>>>>> Ciao, Neil
>>>>
>>>> I did that but it did not change the focuscontrol.name.
>>>> so when I exit a dialog it's repeating the ongotfocus event.
>>>>
>>>> // get value at beginning
>>>> string x ; x = appw.form.currentpage.wxformpage.focuscontrol.name
>>>> // x = selcntrbtn – this control has the ongotfocus attached to it.
>>>> // setfocus somewhere else
>>>> if app.prmttype == "1"
>>>> me!MechName.setfocus()
>>>> else
>>>> me!ProjDesc.setfocus()
>>>> end if
>>>> // immediately test value again
>>>> string x ; x = appw.form.currentpage.wxformpage.focuscontrol.name
>>>> // x is still selcntrbtn
>>>>
>>>> Jean
>>>>>
>>>>
>>>
>>> If you are popping up a dialog in an onlostfocus event, are you setting the focus with the dialog still up? If so, wxWidgets will
>>> mess you over. It stores the ID of the control that last had focus when the window loses focus, and restores it when the window
>>> receives focus again. I have not been able to find a clean way to prevent this yet (but not for lack of trying). To solve this, in
>>> your onlostfocus event where you call the dialog, disable the event when going into the function, set focus to the correct control
>>> after you return from the dialog call, and just before exiting restore the function to the onlostfocus event for the control.
>>>
>>> I know it is messy, but it is unfortunately caused by the screwy behavior of wxWidgets.
>>>
>>> Ciao, Neil
>> I am not calling a dialog per se but I think getuserinput is a glorified
>> one…
>> But I am not setting focus with the dialog still up but BEFORE the
>> dialog is even called. Code above is followed by a getuserinput
>> statement so you can see where I'm setting focus to another field before
>> even getting to any dialog yet it still did not change.
>>
>> Can you tell me why the code snippet above did not change the
>> focuscontrol property?
>>
>> Jean
>>
>
> Until you return to the wxprocess() (by leaving the event handler) I don't think you will see the result of your setfocus() call.
> Also, you should setfocus() after you call getuserinput() which is implemented using a dialog. It doesn't actually matter that it
> is a dialog, what matters is that whatever you did resulted in a loss of focus to the current form. It could be an appactivate().
>
> Ciao, NeilI ended up using your "messy" suggestion and it was actually not messy
all, just not elegant. At this point, if it gets the job done that's all
I need.Thanks!
JeanJean ValleeParticipantOn 5/2/2013 1:20 PM, Neil Robinson wrote:
> On 30/04/2013 17:56, JV wrote:
>> On 4/30/2013 9:24 AM, Neil Robinson wrote:
>>> On 29/04/2013 21:19, JV wrote:
>>>> On 4/29/2013 1:39 PM, Neil Robinson wrote:
>>>>> On 22/04/2013 19:43, Jean Vallee wrote:
>>>>>> Been trying to use wxgetscreentextextent to print white text on black
>>>>>> background.
>>>>>> However, the width in pixel returned by it is not correct. Putting ruler
>>>>>> to paper, it's telling me the text will be 3.11" wide when it's actually
>>>>>> only 2.25" (approx).
>>>>>> Makes it print extra black "space" at end of text.
>>>>>
>>>>> Hi Jean,
>>>>>
>>>>> This function is not tuned to use printer fonts. It can only reliably tell you how much space is required to display the text in
>>>>> pixels.
>>>>>
>>>>>> wxfont revfonthead
>>>>>> revfonthead =@ wxfont.new("Tahoma",14,"n","b","", error = e)
>>>>>> wxgetscreentextextent(revfonthead, "RESIDENTIAL CONSTRUCTION", width = tw,
>>>>>> height = th)
>>>>>>
>>>>>> // tw is now 299 – way too big – should be about 216 or so…
>>>>>>
>>>>>> integer mtw
>>>>>> mtw = tw/app.form.currentdpi * 25400 ;// to convert to mm
>>>>>>
>>>>>> // then I use mtw to specify a printwidth on a printform1
>>>>>>
>>>>>> Any ideas on how to make it more accurate?
>>>>>
>>>>> The result is the value in pixels. Any conversion assumes a direct relationship with a printout, which is not the case.
>>>>>
>>>>> Ciao, Neil
>>>>
>>>> Ok so how do you estimate how much space a paragraph of text will take
>>>> up on paper with a specified font and point size? I have many comment
>>>> boxes that need to be printed as part of reports and they could be a
>>>> single word, sentence or many paragraphs. I need to know if they will
>>>> fit on the page I'm currently printing or I need to break the field and
>>>> print what doesn't fit on the next page.
>>>>
>>>> I'm using printform1 for reports.
>>>>
>>>> Jean
>>>>
>>>
>>> You are trying to recreate what the graphic report engine does, although even it won't currently break a record across pages, it
>>> will just move it to the next page. I have an internal function that calculates the length and height of a string using the
>>> current Windows default printer (it is a very good idea to make sure that the default printer is the one you expect to use with
>>> SIMPOL). It is not a trivial piece of code.
>>>
>>> Ciao, Neil
>>
>> That is why I chose printform1 over the graphic report. It is
>> conceivable that the comment field may be larger than a entire page.
>> And I always know what the destination printer for reports is (stored in
>> user settings table).
>>
>> So would you care to share your solution?
>>
>> Jean
>>
>
> I have had a brief look, but it will take a bit of surgery to extract the code from the graphicreport library, since this is a
> member function of a graphicreport1 object. I will see what I can do.
>
> Ciao, NeilThank you. I'm sure I'm not the only one who will need to print comment
fields of unrestricted length.
JeanJean ValleeParticipantOn 5/2/2013 1:21 PM, Neil Robinson wrote:
> On 02/05/2013 16:24, JV wrote:
>> On 5/1/2013 7:07 PM, JV wrote:
>>> On 5/1/2013 1:05 PM, JV wrote:
>>>> Suddenly I'm finding myself flying blind.
>>>> Watch window is not showing any values.
>>>> window flashes like it's being updated when I step thru code.
>>>> I rebooted already
>>>> How do I get it back?
>>>>
>>>> Jean
>>> I reinstalled 1.74 and still nothing. HELP!
>> And just as sudden it's fine…
>> Jean
>>
>
> You always need to check the Thread Manager. You may not be debugging on the correct thread.
>
> Ciao, NeilI should have mentioned that I already checked that. Only 1 thread
running. If I had more than 1 I could not step thru code if I was on the
wrong one, correct?But now the problem is intermittent. Sometimes it displays values and
sometimes not. I need to see what it thinks a value is since I disagree
with it.Jean
Jean ValleeParticipantOn 4/30/2013 12:58 PM, JV wrote:
> On 4/30/2013 9:26 AM, Neil Robinson wrote:
>> On 30/04/2013 01:47, JV wrote:
>>> On 4/29/2013 1:42 PM, Neil Robinson wrote:
>>>> On 24/04/2013 13:36, Jean Vallee wrote:
>>>>> I have converted a dataset from a client and I have one record with a
>>>>> number field that the IDE is telling me had a value of .inf when in
>>>>> fact
>>>>> it's 14476.10.
>>>>>
>>>>> I'm debugging reports now, comparing the Simpol reports to the
>>>>> Superbase
>>>>> reports to make sure they match.
>>>>>
>>>>> I've retyped the value in the field and saved the record. I duped the
>>>>> original record and deleted the original. I reorged the file.
>>>>>
>>>>> What would cause this and how can I avoid it in the future?
>>>>>
>>>>> Jean Vallee
>>>>>
>>>>>
>>>>
>>>> Hi Jean,
>>>>
>>>> Are you saying that the data as converted using the conversion tool
>>>> contained a .inf value in a field?
>>>>
>>>> Ciao, Neil
>>>
>>> Yes, I used the tools provided to convert the db's. I've found a couple
>>> of other records like it as well (out of 4000+)
>>>
>>
>> I would be interested in a copy of the SBF that produced this,
>> together with enough info to identify which record we are looking
>> at. Can you make copy of the file and try and remove all data except
>> maybe one record that shows this and which when converted
>> still has a .inf value?
>>
>> Ciao, Neil
>
> I'll work on it later this pm. It's screwing up my reports so I must
> have a solution.
>
> JeanI am using a volatile db to sort records. If the user had selected a
code but not entered a value for that code, it was sometimes .inf when I
read it. I'm accumulating totals by code so .inf + anyvalue = .inf.I will still try to replicate how they are getting .inf in the first
place but don't have time right now to create a dummy set of data to
send you. I have too many clients chomping at the bit to get the new
version.Jean ValleeParticipantOn 5/1/2013 7:07 PM, JV wrote:
> On 5/1/2013 1:05 PM, JV wrote:
>> Suddenly I'm finding myself flying blind.
>> Watch window is not showing any values.
>> window flashes like it's being updated when I step thru code.
>> I rebooted already
>> How do I get it back?
>>
>> Jean
> I reinstalled 1.74 and still nothing. HELP!
And just as sudden it's fine…
Jean - AuthorPosts