NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Devan

Pages: [1] 2 3 ... 7
1
Hey all,

Just wondering if anyone else out there using NetTalk 8 or 9 with a MySQL database via MyODBC has had a history of GPFs ?

We don't do anything out of the ordinary with this app - all pretty basic NetWebBrowses and NetWebForms etc., but we seem to be getting an inordinate number of GPFs.  We installed GPFReporter, to get the logs, but the server does not always restart cleanly and seems to leave a prior running process in memory which means a manual shutdown and restart of the app is required.

We cannot seem to pin point exactly where the error is happening.  We've upgraded the ODBC drivers from the 3.x versions to the 5.x ones, but still the same.  Wonder if anyone else has experienced similar issues, and how you resolved it, if indeed you resolved it?

Here is a sample log dump from GPFReporter:


Code: [Select]
----------------------------------------------------------------------------------
Program : C:\Apps\StudentPortal\StudentPortal.exe
Version :
At : 13:32:05 on 2014/09/19
Workstation: : ip-0A976895
User Name: : Administrator
Reported error : EXCEPTION_ACCESS_VIOLATION - Error reading data at : 000003B0h
Windows : Win 2008-, Terminal Server 6.0.6002 Service Pack 2
Clarion : 0.801
Thread : 3 Field : 0 Event : 0 Keycode : 0
Error at address : 69A2C52Fh  no debug info, Module=C:\Program Files\MySQL\Connector ODBC 5.2\myodbc5a.dll 5, 2, 5, 0
Stack Trace
[01] 69A198F9h no debug info, Module=C:\Program Files\MySQL\Connector ODBC 5.2\myodbc5a.dll 5, 2, 5, 0
[02] 69A1993Bh no debug info, Module=C:\Program Files\MySQL\Connector ODBC 5.2\myodbc5a.dll 5, 2, 5, 0
[03] 69A19CBBh no debug info, Module=C:\Program Files\MySQL\Connector ODBC 5.2\myodbc5a.dll 5, 2, 5, 0
[04] 69A10333h no debug info, Module=C:\Program Files\MySQL\Connector ODBC 5.2\myodbc5a.dll 5, 2, 5, 0
[05] 69A10971h no debug info, Module=C:\Program Files\MySQL\Connector ODBC 5.2\myodbc5a.dll 5, 2, 5, 0
[06] 69A109C1h no debug info, Module=C:\Program Files\MySQL\Connector ODBC 5.2\myodbc5a.dll 5, 2, 5, 0
[07] 7365FFCDh no debug info, Module=C:\Windows\system32\ODBC32.dll 6.0.6002.18362 (vistasp2_gdr.101228-0237)
[08] 73699DB8h no debug info, Module=C:\Windows\system32\ODBC32.dll 6.0.6002.18362 (vistasp2_gdr.101228-0237)
[09] 00382C79h no debug info, Module=C:\Apps\StudentPortal\ClaODB.dll 8.0.9759
??? 0068E988h Line ?=42 no proc Src=Stude_nw.clw
??? 00407843h Line=493 Proc=FUNCTIONCALLED_@_FILECALLBACKINTERFACE_@_FILEMANAGER@F21FILECALLBACKINTERFACEl6PARAMSRscRsc  Src=ABFILE.CLW
??? 01120840h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 0112E910h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 0112E978h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 0112E8A8h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 0112E978h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 0112E770h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 0112E9E0h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 0112E978h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 0112E5DCh Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 0112EBD0h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 0112EBD0h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 01125824h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 0068E5E8h Line ?=42 no proc Src=Stude_nw.clw
??? 01120840h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
??? 0053A0E4h Line=3684 Proc=R$GENERATETABLEROWS  Src=StudentPortal001.clw
??? 0053A592h Line=4314 Proc=R$ADDPACKET Src=StudentPortal001.clw
[10] 0053AF3Eh Line=3611 Proc=R$BROWSETABLE Src=StudentPortal001.clw
[11] 0053C58Ah Line=3565 Proc=R$GENERATEBROWSE  Src=StudentPortal001.clw
??? 0067A4E4h Line ?=42 no proc Src=Stude_nw.clw
[12] 0053CC44h Line=3141 Proc=R$TAKEEVENT Src=StudentPortal001.clw
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
??? 00672BD0h Line ?=42 no proc Src=Stude_nw.clw
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
[13] 0053DFDFh Line=3095 Proc=BROWSESTUDENTS@F18NETWEBSERVERWORKER  Src=StudentPortal001.clw
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
??? 00677150h Line ?=42 no proc Src=Stude_nw.clw
??? 011004D2h Line=3342 Proc=9_PRINTDLG__SetVarProperty@FiP3Ufo  Src=wsl.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
[14] 0054E0ABh Line=1132 Proc=PROCESSTAG@F13THISNETWORKERsb  Src=StudentPortal001.clw
??? 00665D4Ch Line ?=42 no proc Src=Stude_nw.clw
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
[15] 00480EA3h Line=6389 Proc=_HANDLETAG@F18NETWEBSERVERWORKERsbOsb  Src=NetWeb.Clw
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
[16] 0047DEA2h Line=6876 Proc=R$MIDDLEBIT Src=NetWeb.Clw
??? 00668908h Line ?=42 no proc Src=Stude_nw.clw
??? 00666AD0h Line ?=42 no proc Src=Stude_nw.clw
[17] 0047E292h Line=6838 Proc=PARSEHTML@F18NETWEBSERVERWORKERRsbllUc  Src=NetWeb.Clw
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
[18] 0047E3D6h Line=6755 Proc=PARSEHTML@F18NETWEBSERVERWORKER12STRINGTHEORYllUc  Src=NetWeb.Clw
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
[19] 004697E3h Line=7714 Proc=MAKEPAGE@F18NETWEBSERVERWORKEROsbllOsbOsbOsb  Src=NetWeb.Clw
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
[20] 0054C85Ch Line=1467 Proc=R$CASE:BROWSESTUDENTS  Src=StudentPortal001.clw
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
[21] 0054D6D8h Line=1364 Proc=R$CASESTART:STUDENTPORTAL  Src=StudentPortal001.clw
[22] 0054D904h Line=1350 Proc=_SENDFILE@F13THISNETWORKERsbl  Src=StudentPortal001.clw
[23] 0047F3C9h Line=6198 Proc=_HANDLEGETREST@F18NETWEBSERVERWORKER  Src=NetWeb.Clw
??? 00672BD0h Line ?=42 no proc Src=Stude_nw.clw
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
[24] 00488406h Line=2628 Proc=PROCESSREQUEST@F18NETWEBSERVERWORKERsb  Src=NetWeb.Clw
??? 0067F42Ch Line ?=42 no proc Src=Stude_nw.clw
[25] 0054EC2Eh Line=990 Proc=WEBHANDLER@Fsb  Src=StudentPortal001.clw
[26] 010BEF33h no line number Proc=15ThreadLaunch_EH$Run@F  Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 011349DCh Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 01116F2Ah Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
[27] 010BEC59h no line number no proc Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 01116F45h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 011349DCh Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 01134A5Ch Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 01129378h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 0112938Ch Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 011293A8h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 0112939Ch Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 011293C4h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
??? 011293B8h Line ?=26 no proc Src=wxeh.cpp Module=C:\Apps\StudentPortal\ClaRUN.dll 8.0.9759
[28] 77D416C3h no debug info, Module=C:\Windows\system32\ntdll.dll 6.0.6001.18000 (longhorn_rtm.080118-1840)
[29] 77D41696h no debug info, Module=C:\Windows\system32\ntdll.dll 6.0.6001.18000 (longhorn_rtm.080118-1840)


Thanks,
Devan

2
Web Server - Ask For Help / Printing a report with no detail lines
« on: August 18, 2014, 12:05:48 AM »
This isn't technically a NetTalk issue directly, but it affects an NT7 site that we currently have (in Clarion 8 - We haven't upgraded this one to NT8 and Clarion 9 yet).

We have a routine in there that generates a PDF Order Confirmation report on disk and emails it to the user and our client's sales team on a background thread.  All works fine except that it used to NOT create the PDF whenever the user entered an order with no detail lines.

Our client has come back to us and said that even if the user does not enter any lines on the order, they still want the report to generate and be sent to the user and their sales team.  I've done a brief search, and it seems to be popular believe that if we embed:

ReturnValue = 0

on the ThisWindow.OpenReport embed point, it should print the report irrespective of whether it finds detail records or not, but it still does not seem to be working.

Any tips on how we can still get the report to forcibly print the header bands etc.?

Cheers,
Devan

3
We are designing a NetTalk based web app that will be called when a user scans a QR Code on bottles of medication that is supplied by our customer.

Basically, when the user scans a QR Code, they will be taken straight to a WebForm which displays information on that vial.

It works fine on the desktop and mobile versions of the site - HOWEVER, on the desktop version, the main menu is available, so the user can then go to the home page by clicking the first menu option, then navigating elsewhere on the portal.

On the mobile version of the site - the menu does not appear.  Not a big problem.  I was thinking to add a 'Home' button on the top bar of the mobile screen so that the user can go back and do other thing but I am not sure which is the best way to go about this?

At the moment, I have added a button at the bottom of the form, but ideally would like it to be on the top bar for a better mobile experience.

Thanks,
Devan

4
Web Server - Ask For Help / Redactor editor kaput?
« on: May 15, 2014, 06:48:54 PM »
Hi all,

Just starting a new project with Clarion 9.0 and NetTalk 8.10.

I have a form that has a Text edit area in it, and I left everything as per the default Redactor editor, but having a problem with it.

The editor box and controls are showing, along with the toolbar etc., but I cannot click within the editor window to make and changes to the content.  If I preload content in the database directly, it shows in the editor window, but I cannot change anything.

Tried it in Chrome and IE with the same results.

Have I missed something important?

I tried switching back to TinyMCE as the editor, but it gives me NO editor window - just a plain HTML text box.  Wondering if the template is broken, or there is another issue?

Thanks,
Devan

5
The Rest - Ask For Help / Multiple page requests with NetWebClient
« on: March 26, 2014, 08:43:37 PM »
I have a small Clarion applet which runs a NetWebClient Fetch() against a web service.  Sometime only one page, but often 3 or 4 pages depending on the results of a SQL query.

I have the Fetch()es in a loop, i.e.

Code: [Select]
Loop
  Next(SQLFile)
  If Error() Then Break.
  ThisNetWebClient.Fetch('http://mywebservice.com/getarecord?id=' & SQL:SomeID)
End

I thought with asynchronous Fetch()es, that the ThisNetWebClient.PageReceived will be called each time a Fetch() returned some data, but it doesn't seem to be doing that.  So far, I trace multiple Fetch() calls going out, but only one PageReceived() being called - for the first Fetch() only.

What is the best way to queue up multiple concurrent Fetch() calls?

Thanks,
Devan

6
Web Server - Ask For Help / NetTalk threads and open files
« on: March 03, 2014, 10:00:36 PM »
Hi all, just come across a curious situation here, and wondering if someone can shed some light on where the problem lies.

We have designed a small NetTalk app for a customer to register walk in members for a gym.  Really simple NetTalk site with a page that asks for the member ID (which is scanned at the terminal), then another Process that checks the number against a legacy database and then displays either a "Welcome" screen or a "Please Register" screen momentarily before going back to the main screen.

The only file access is during the CheckLogin procedure that gets called by the IndexPage.  The CheckLogin process opens up the user file on the legacy database using an ODBC driver, then closes the files straight afterwards.

I thought this would only momentarily touch the files and exit, leaving those files free from locks, however the customer's IT department is saying that they cannot backup the legacy database every night because it is saying the files are open in the NetTalk app.  Closing down or restarting the NetTalk app completely appears to clear the locks.

Now, I thought that once I deliberately closed the files in the Process, or the process thread ended, the files would be closed and any locks released?  Could there be phantom threads still running in the background?  Is the fault with the third party ODBC driver?  Or the Clarion ODBC driver architecture?

The files are defined in the main app dictionary, but the files are ONLY referenced in the CheckLogin NetWebPage - which is not actually a displayed page, but a snippet of embed code that then redirects the user depending on the check login status.

It's not a huge problem, but I'm curious to know where to start looking for the issue.

Thanks,
Devan

7
Web Server - Ask For Help / How many using C9 now?
« on: February 25, 2014, 05:02:12 PM »
Hey all - This is off topic I know, but I was wondering how many NetTalkers have moved up and are using C9.x for production code?

I am still on 8.0.9759 but am on the CSP and have C9 as well - just haven't bothered to upgrade all my myriad of 3rd party libraries etc. up to C9 to begin using it properly.  Been really happy with the stability of C8, so was wondering if there was any compelling reasons to step up to 9?

At this point in time, our app development word is around 60% NetTalk webapp projects and 40% Windows native projects.  All straight up Clarion, not Clarion.NET.

What are others using?  I'd be interested to hear if anyone is still on C7 or C6 even...


8
Web Server - Ask For Help / Browse not saving data back to database?
« on: February 10, 2014, 06:09:01 PM »
Just got a very concerning heads up from one of my clients that they are experiencing an issue with a NetTalk app I wrote for them.  They have shown me instances where a Browse screen (order form) does not appear to be saving SOME information back to the back end SQL database.

There is no real extra coding etc. on the browse that I think could be doing it - pretty standard NetWebBrowse embedded in a form.

As you can see on the attached screenshots - ALL the lines have quantity, price and line total, yet when we print the order report, two of the lines STILL have the quantity, but no price and line total?!?  Checking the database shows that the price and line total of those order lines are zero!

Seems to be intermittent.  This particular site has been up for over a year, but the problem seems to have raised it's head in the past few months, around the time I did an upgrade for them using 7.31 (or thereabouts) of NetTalk.

Anyone else seen this, or can shed some light on why this may be happening?

Cheers,
Devan



[attachment deleted by admin]

9
Hey all, just thought I might try and see if we can get an open discussion going on the comparative strengths and weaknesses of different web application frameworks.

In recent months, I've been involved in creating several web apps using a Ruby framework.  No, not Ruby on Rails, but one called Padrino, which is based on Sinatra.

Overall, I found the Ruby syntax to be quite elegant - in a similar way that I think the Clarion syntax is also elegant.

Here are my findings so far...

THE GOOD:

* MVC - Biggest advantage I can see to Rails/Padrino etc. is the separation of the data models from the rendered views etc.  The MVC (Model/View/Controller) methodology took a bit of getting used to, but once I figured it out, it became quite a productive process to create new pages and tie them all back to the back end data models.  Like Clarion, the MVC paradigm allows for different back ends to be interchanged.

* Environments - I love the way that Rails/Padrino allows you to switch between development, testing and production environments, including creating and managing separate data sets for each stage of the development process.  I can freely create junk testing data in 'development' mode, then switch to 'production' and check reports in the live database without fear of overwriting the wrong database.  Just one system flag to change between environments.

* Rendering engines - I like the way that these frameworks can use different 'engines' for rendering the final HTML.  I am particularly enjoying using HAML as a markup language.  The 'View' paradigm really makes in a cinch to create chunks of HTML and arrange them on a page.  This is probably the BIGGEST advantage of NetTalk that I am really enjoying.  I like that you can create code snippets in NetTalk too, but it is a lot more difficult to 'see' the big picture of how the whole page will eventually look when you have lots of snippets that are inserted into a page programatically.  If we could pull all the page rendering code out into a separate templating system in NetTalk, I will be in heaven!

* View independence - Related to my point above, I found it SO much easier to integrate third party templates that are available for sale out there into my Padrino projects that I did into my NetTalk projects.  I like that you can opt to use a Bootstrap framework, or even a WordPress one with some mods.  I like the themes that are provided in NT, but I would really like to be able to pull a third party one off the shelf and have it work quickly and easily.


THE "I'M STILL NOT SURE"

* ORMs - Object Relational Models.  In one aspect, I find them great.  I can add or change fields in a model file and then run a 'migrate' task to make on the fly changes to the actual database.  Very much like a Clarion dictionary sync.  The ORM also contains all the relationships between the model object, which aren't really as intuitive as you first think, but eventually make sense.

I LOVE: That you don't have to write SQL any more, even for complex multi table joins.  If I wanted the invoice date, I would just ask for:

Code: [Select]
invoice.date
which I could place on a view to show the user.  What astounded me is how easy it was to do complex things, such as finding out the total cost of all line items belonging to the current invoice.  It is as easy as:

Code: [Select]
invoice.invoice_detail.sum(:item_total)
where 'invoice_detail' is the child model for 'invoice' and ':item_total' is the symbol pointing to the table column 'item_total'.

I HATE: That some of the SQL generated by the ORM and sent to the back end is quite inefficient.  Also ORMs seem to have great difficulty interpreting custom Views that you might have created yourself, or even legacy databases that a rigid in nature.


THE BAD

Still haven't found anything REALLY bad here that I think is worthy of mention, but I am sure I may come across some as I delve deeper into this world.




Given that Bruce has talked about NetTalk evolving into a more of a 'stand alone' product which is not necessarily linked to Clarion, I am wondering if things such as MVC, ORMs etc. are part of the roadmap.

How about others out there in the NetTalk world?  Anyone dabbled in other frameworks?  How have you found them?

Just to clarify, I still love and use NetTalk for a lot of projects - I just thought I would share my discoveries as I venture out into other parts of the web development world.

NOTE: If you want to check out

10
Web Server - Ask For Help / Custom CSS and Javascript includes?
« on: January 11, 2014, 01:35:15 AM »
Hey all,

I am trying to incorporate a 3rd party Lightbox functionality into my NT7 project.

The Lightbox developers say I just need to include one CSS and one JS file into my site and it is all good to go.  I went to the 'Action' properties on my IndexPage which is the main page of my site, and under the 'Scripts' and 'CSS Class' tabs, I added in the relevant JS and CSS files.

Now, when I go to my site, under the main home page, I see the two custom included CSS and JS files in the <head> section, but as soon as I open another Browse or Form, they disappear!

How can I make these custom included files persist through ALL pages on my site?

Thanks,
Devan

11
Web Server - Ask For Help / Pop up images on a browse
« on: January 08, 2014, 06:52:25 PM »
We've just been approached by a client to design an ecommerce style system using NetTalk.

One thing they *insist* on is the list of products contain a thumbnail image of the product, which is trivial to do, but they also want a full size image to pop up whenever the user moves the cursor over the thumbnail.

I know there are various jQuery etc. libraries that can do this, but just wanted to throw it out there to the general NT user group to see if anyone has a library or system that works well with NT?

In writing this, I am thinking that the hover option might not be best, as they are also talking about using this on iPads for field service agents, so I think we will have to go with clicking/tapping on the thumbnail to zoom in...

Thanks,
Devan

12
Web Server - Ask For Help / Possible bug in lookups?
« on: December 09, 2013, 07:58:28 PM »
Hey all,

I have a simple order entry NT7 site.  Got the usual Order Items browse with a button to 'Add' a new line which goes to an Item Add NetWebForm.  On this form is the field for the Product Code (read only), with a Lookup button that calls a Product List NetWebBrowse so that the user can search/select an item.

Now, we've noticed that many users click on the lookup button to bring up the list, then they type in a search filter which returns NO results in the browse.  Problem is - they tend to click the 'Select' button to close the window.

This tends to return garbage(?) data back to the product code field.  It is usually 6 to 8 uppercase alphabetic characters.  I am assuming it is some sort of hash being generated by NT in the background.

No problems if they [Esc] or click the 'x' to close the browse window.  Only if they click 'Select'.

My question is - is it possible to disable the 'Select' button if a search filter returns no records?  If not, is there a condition that I could apply in the browse properties to disable/hide that button when there are no records to choose?

Thanks,
Devan

13
NetTalk is great for building browser based apps, but we still will work on a lot of Win32 based apps here at my company, and have found a way to incorporate a lot of NetTalk based features to make our apps run better.

Because I do a lot of development work on Mac OS X as well, I have become somewhat used to the nifty 'Growl' notification engine on that platform - whereby many different apps can post system wide notifications in a beautiful, non intrusive way.

Imagine my surprise and delight when I discovered that there was a Growl implementation for Windows as well.  http://www.growlforwindows.com/gfw/

To summarise - Growl is a totally customisable system 'alert' window.  The alert windows can be shaped to look like pretty much anything you want, and they can slowly morph into view discreetly and then fade out again.  They can even be made sticky, and will neatly cascade for you if you don't respond to them immediately.  The system even keeps a log of all old messages so you can go back and audit them later.  You can even have icons and images in the notifications and even incorporate callbacks so that users can take action by clicking on the notification window.

We have switched to using Growl for alert messages on nearly all our apps now.  Our users love it as they are not as intrusive as a normal app message, yet they still catch their attention.

As an example - we have an app we designed for a Pawn/Loan shop.  Whenever they go to add a new pawn contract for an existing customer, and the customer has any outstanding contracts that are overdue, we flash up a Growl notice about the overdues.  This doesn't actually interrupt their workflow while they are entering a contract at all, but they don't miss the little box that fades in and fades out at the top of the screen while they are working.

How did we integrate Growl?  Well, really just by using the NetTalk WebClient template.  It is that easy.  I have included a small test app with this post that you can explore.

The first thing you have to do is to download and install Growl For Windows from http://www.growlforwindows.com/gfw/.  This is a once only step on each PC that you want Growl notifications on.

Then in your app, you really need two procedures.  One to REGISTER your app with Growl, and one to SEND the Growl notifications themselves.

Growl uses a proprietary GNTP protocol on port 23053.  It is really a slightly customised HTTP protocol.  The actual code to register your app is as follows:

Code: [Select]
! Send the Registration
Window{PROP:Hide} = 1
LOC:Packet = 'GNTP/1.0 REGISTER NONE<13,10>'
LOC:Packet = Clip(LOC:Packet) & 'Application-Name: ' & Clip(pAppName) & '<13,10>'
If Clip(pAppIcon) <> '' ! If the icon was not omitted, add it
LOC:Packet = Clip(LOC:Packet) & 'Application-Icon: ' & Clip(pAppIcon) & '<13,10>'
End
LOC:Packet = Clip(LOC:Packet) & 'Notifications-Count: 1<13,10>'

! Blank line
LOC:Packet = Clip(LOC:Packet) & '<13,10>'

LOC:Packet = Clip(LOC:Packet) & 'Notification-Name: General Notification<13,10>'
LOC:Packet = Clip(LOC:Packet) & 'Notification-Enabled: True<13,10>'
LOC:Packet = Clip(LOC:Packet) & '<13,10,13,10>'

GROWL:ApplicationName = Clip(pAppName)
ThisNetGrowlRegister.Init()
ThisNetGrowlRegister.AsyncOpenUse = 1
ThisNetGrowlRegister.AsyncOpenTimeOut = 1000 ! 10 Seconds
ThisNetGrowlRegister.InActiveTimeout = 2000 ! 20 Seconds
ThisNetGrowlRegister.Open('127.0.0.1', 23053)


And for sending a notification, it is as easy as:

Code: [Select]
! Send the Notification
Window{PROP:Hide} = 1
LOC:Packet = 'GNTP/1.0 NOTIFY NONE<13,10>'
LOC:Packet = Clip(LOC:Packet) & 'Application-Name: ' & Clip(GROWL:ApplicationName) & '<13,10>'
LOC:Packet = Clip(LOC:Packet) & 'Notification-Name: General Notification<13,10>'
LOC:Packet = Clip(LOC:Packet) & 'Notification-Title: ' & Clip(pNotificationTitle) & '<13,10>'
LOC:Packet = Clip(LOC:Packet) & 'Notification-Text: ' & Clip(pNotificationMessage) & '<13,10>'
! Check if sticky flag omitted
LOC:Packet = Clip(LOC:Packet) & 'Notification-Sticky: ' & Choose(pNotificationSticky, 'True', 'False') & '<13,10>'
If Clip(pNotificationIcon) <> '' ! If the icon was not omitted, add it
LOC:Packet = Clip(LOC:Packet) & 'Notification-Icon: ' & Clip(pNotificationIcon) & '<13,10>'
End

LOC:Packet = Clip(LOC:Packet) & '<13,10,13,10>'

ThisNetGrowlNotify.Init()
ThisNetGrowlNotify.AsyncOpenUse = 1
ThisNetGrowlNotify.AsyncOpenTimeOut = 1000 ! 10 Seconds
ThisNetGrowlNotify.InActiveTimeout = 2000 ! 20 Seconds
ThisNetGrowlNotify.Open('127.0.0.1', 23053)

You will note that here we are sending the notifications to 127.0.0.1 on the local machine, but YES, you can actually send Growl notifications to OTHER machines on the network.  For example, if one of the workstations suffers a database failure, you can send a Growl notification to the sysadmin on the server PC etc.  Even simple 'chat' applications are possible without having to fuss over designing an interface.

The other beauty is that each workstation or operator can customise the way they see the Growl notifications.  Some may want a simple 'bubble' popup.  Others may want an iPhone style box, some may like the traditional OS X style.  There are tons of styles in the public domain, and you can make your own as well. http://www.growlforwindows.com/gfw/displays.aspx

Check the sample app here for more details.  Feel free to lift the code and incorporate into your own apps as we do.

Cheers,
Devan

[attachment deleted by admin]

14
Just got a report today from a client using an NT site that we only just upgraded to 7.2 last week.  They are entering in a student into the database with the Irish surname of O'Sullivan.

Problem is, when they do this, they cannot then find the student again in the Student Browse locator by typing in "O'Sullivan".  It comes up with 0 results.  They can however, type in "Sullivan" and because the Locator is a "contains" locator, the record comes up.

However, when they select to [Change] the student details, the update form either throws an error that the record is not found in the primary key, or it brings up a blank record, and the form itself is all always messed up as the CSS for the 6 tabs don't kick in and the form is displayed as a continuous running form with all the tabs under each other.  The [Ok] and [Cancel] buttons also don't work.  Only happens for any student with a forward single tick in their surname.

(I found some older students in there with the forward ticks in their name, and they exhibit the same behaviour which was never reported by the client before, so I only assume that it used to work okay under NT 6.x but broke under 7.x ???)

Conclusion:  NetTalk hates Irish names... :)

I have worked around this for now by changing the names in the database to use back ticks (`) instead of forward ticks in the name and things seem to be working again, but perhaps we need to code the templates defensively against this for the future?

Time for another pint of the black stuff...

15
Web Server - Ask For Help / Strange button behaviour in NT7
« on: September 30, 2013, 10:54:21 PM »
Hey all,

I have a NT7 web server running for a client, and I have an OrderDetailForm NetWebForm on there which contains a button that prints a PDF report out.  The Procedure that creates the PDF report is called 'WebOrderReport'.

I have defined a button which calls the procedure 'WebOrderReport' and has the Parameters:

'ID=' & Clip(OHD:ID) & '&OrderNumber=' & Clip(OHD:OrderNumber) & '&tflag=' & Clock()

I have also defined the Target Frame as "_blank_" so it opens in a new window without affecting the open order screen.

When testing here in house, everything works OK, and when the new browser window is opened with the PDF order displayed, I check the URL at it is:

http://blah.com/WebOrderReport?ID=xxx&OrderNumber=nnn&tflag=nnnnnn

The problem is, on the live site, the button only works about 50% of the time.  Most of the time they press the button, they are getting a browser 'Page Not Found' popping up.  I asked them to send me a screenshot, and I noticed on the failing screenshots, the URL is:

http://blah.com/WebOrderReport?__Referer__=http%3A//blah.com/OrderDetailForm?ID=xxx&OrderNumber=nnn&tflag=nnnnn

I am not sure what is appending the "__Referer__" bit to the URL.  It appears to be the URL of the calling Order Details page.

What would cause NT7 to mangle the URL like this?  I initially thought that perhaps the PDF was not being generated, but I've checked the temp folder where the generated PDF files are stored, and it certainly looks like they are being created correctly.

At a loss as to where to start looking for the source of the problem.  Especially seeing as I cannot seem to replicate it here in house.

Cheers,
Devan

Pages: [1] 2 3 ... 7