PBDJ Blog Post
I spent a few hours today getting our PowerBuilder applications to properly
spell check using Wintertree’s Sentry Spell Checking Engine. This spell
check engine revolves around one DLL and a few dictionaries.
Now, I haven’t gotten to the point of adding spell check as you type, but
they say it is possible.
I ended up with one non-visual user object that contains all my code. This
user object has one public function of_spell_check(string as_text) that takes
the text you wish to spell check as a parameter.
To start, I needed to declare 6 local external function calls into the
provided DLL:
FUNCTION long SSCE_CheckBlockDlg(ulong hWnd, REF string textToCheck, long
textLength, long newlength, int showContext) LIBRARY "SSCE5532.DLL" ALIAS FOR
"SSCE_CheckBlockDlg;Ansi" FUNCTION integer SSCE_SetKey(long key) LIBRARY
"SSCE5532.DLL" FUNCTION integer SSCE_SetU... (more)
PBDJ Blog Post
For the longest time, I’ve wanted to contribute something back to
PowerBuilder – mostly in an OSS way.
I signed up to be a developer on the codeplex hosted pfc code that Bruce
Armstrong posted, but there is zero activity over there.
I could fork PFC and start a new project, but what I could I add to the
project that wouldn’t be better suited just being a part of PFC itself?
I could start a new framework altogether, but that just seems like a lot of
re-inventing the wheel.
I don’t have the knowledge to come up with stuff like Brad Wery over at
PowerToTheBuilder, so... (more)
PBDJ Blog Post
One way I’ve found to do this is through a few calls to the system to query
whether the application is already running or not.
Placing the code in the application’s open event is one way of handling
more than once instance.
See example code below:
OleObject locator,service,props String ls_query int num, ret ls_query =
"select name , description from Win32_Process where name = 'textpad.exe'"
locator = CREATE OleObject ret =
locator.ConnectToNewObject("WbemScripting.SWbemLocator"); service =
locator.ConnectServer(); props = service.ExecQuery(ls_query); num =
pr... (more)
PBDJ Blog Post
I haven’t been in the PowerBuilder game long, so I’m sure some of you
already know about this tidbit of information.
I was taught when you need to obtain data from a column in a datawindow for
every row, that you iterate over the rows assigning each rows value to a
particular index in an array of the same type.
Sound familiar to anyone?
Example:
long ll_x, ll_rowcount string ls_people_ids[] ll_rowcount =
dw_people.rowcount() if ll_rowcount > 0 then for ll_x = 1 to ll_rowcount
ls_people_ids[ll_x] = dw_people.object.id[ll_x] next end if
Sure, you can do that…if... (more)
Here is a short clip of our foster dog, Hunter, doing what he loves most!
... (more)