Hi!
I searched in the Internet for a solution of Integration in .Net as simple and as easy as possible in usage even for Clarion 5. But I haven't found any solution like this
http://clarion-net.narod.ru/Clarion_and_Net/
- so I developed new solution to achieve these goals.
I didn't wait for any new version of Clarion (Net or other) for a 4-5 last years. I think the product begin since it was owned by SV in despit of many foreign programmers help them. In 2010 we have no more then we have in 2000... 16bit environment! It is nonsense. It is pity that so powerfull tool with good start almost die in the long run.
Just as an addition to this: I have set up a domain that I will be using for .NET exploration at www.icetips.net. I don't have anything there yet, but I'm setting up a blog and forum at www.icetips.net/blog and www.icetips.net/forum. Cool: my blog site is up:) Not so cool: my forum is broken<g>
Nice blog Arnor,
I look forward to following your journey.
Hope you are enjoying your new found developer freedom as much as I am. I'm really enjoying the VS 2010 experience after neglecting the grass on the other side of the fence for too many years.
Cheers,
Brian
Thank you - I will check out the references you mention. I am not quite ready to explore .NET, but am interested in doing so in the future. I am really disappointed with Clairon.NET progress. I guess it depends on how long (if at all) it takes to get soem real world apps going with clarion as to wheehr I jump ship or not.
In the meantime, I agree wholeheartedly with your comments on the desktop environment.
Excellent review Arnor (and exactly what options I have used since day one also and shown in small webinar done on c7v6)
The parsing done for code completion is also (in my mind and experience) the "source of all problems.
Before they started playing with this all was smooth and SV needed to come up with four levels of optins to "try" and solve but as you showed nowhere near a good working one.
Yes, this is similar as in other editors, and yes, there does not seem to be hotkeys for this. However, this is simply how it is implemented in the #Develop IDE.
Personally I don't find it too difficult to simply zoom in/out using the mouse wheel until the fontsize is likable and just leave it at that:) I think the original font size is 11pt so if I really want to go to the exact original size I can always do that through the options menu.
This is a useful editor feature and I use it often in NotePad++.
However the Clarion IDE implementation of it is incomplete as there is no hot key to reset it to the default font size you have specified for your editor.
There is also no pulldown menu access to the Zoom features.
So once you zoom in or out - the editor font is messed up and the only way to reset it is to drill down to the settings menu in the program setup.
In NotePad++ they have pulldown menu access to Zoom --> Zoom In, Zoom Out and Restore Default Zoom.
You also have hotkeys to access these same functions with CTRL+Num +, CTRL+Num -, and CTRL+NUM /
Being able to zoom in and out in the editor is a very useful feature (especially when searching for code in a large source file or embed).
Too bad that (in typical fashion) the Clarion 7 implementation of it is half done.
Well, I have got couple of responses to my blog and email, both containing variations of the F*** word! I replied to the email and re-iterated my original questions<bg>
I have 2 of the Vantec NexStar 3 enclosures that I use for my off site backups. The eSata port is really fast. Copying the monthly full backup files (nearly 300GB) takes about less than 2 hours. I can't imagine doing that over a USB connection. And the Vantec boxes are really quiet.
This article was about how to implement code completion in C7. I'm not going to argue this with you. I suggest you take this up with Softvelocity directly with PTSS entries. Personally I have not seen any performance issues caused by code completion, but I do not have anything except small test apps in C7 yet. All I'm trying to do is to help people FIND where and how to set this up properly. I have no interest in arguing with you about anything.
You should try UltraTree then to see what real code completion and code folding are and see by yourself there is NO performance issue.
Open any file (clw tpl tpw inc etc...):
add a "variable" or a column name or a table name etc in any code
the second lines already "knows" that variable or column name or table name and offers it as code completion
This simply shows - proves that the "full" procedure is NOT at all required to "know" all .... it is a choice done at SV level - and this choice is what I - personaly - find VERY restrictive (maybe the guys who decided work like that and did not think others could work differently) .....
Which also shows - proves there is NO need to "parse" the full app after a compile like c7 does ....
Code folding and code completion are two completely different things. Code completion is bound to have performance effect, don't think there is any way around it. I'm not much for code folding myself and rarely use it in the editors I use. That said I might write up something about code folding in C7 compared to other editors that I use:)
a REAL pity the :
- code folding is NOT available in embed points
- code completion compells us to have a "parsing" of the app at the end of EVERY compile
- code folding is NOT tweakable
- code folding is NOT working on all "case" code (loop case if etc..)
....
all could have been SO much better but we have it ;)
I also believe that Setup Builder 7 can do this. Normally an elevated program cannot write to the "current user" profile since it is not the same user as the administrator user running the installer. I recall that Friedrich said he was testing this about a year ago, or so, but I haven't followed up on it.
Re: CSIDL_LOCAL_APPDATA, you said:
"Suitable for application data that is completely contained within the application as can be read and written to. This folder is not hidden and the user can explore it at will. Only the currently logged in user has access to this folder.
This folder poses a problem for the installer because when it runs under the administrator account it does not know what the currently logged in user is."
Since 5.2.0 (2007-09-19) version, INNO Setup has the runascurrentuser and runasoriginaluser flags.
From http://www.jrsoftware.org/files/is5-whatsnew.htm :
- On Windows Vista, [Run] section entries with the postinstall flag no longer inherit Setup's elevated privileges by default, and instead now execute with the (normally non-elevated) credentials of the user that started Setup initially. (There are some exceptions; see the runasoriginaluser flag documentation for details.)
- Added new [Run] section flags: runascurrentuser and runasoriginaluser. These control which user credentials are used on Windows Vista when spawning processes. (runasoriginaluser is the default when the postinstall flag is used; runascurrentuser is the default otherwise.)
The reference material is useful to developers in general, regardless of programming languages or tools of choice.
Some of the information is based on Clarion Third Party Add-on products and vendors for SoftVelocity, Inc Programming Tools (Clarion Enterprise and Professional Edition).
Some new and updated sections include:
CSIDL Reference topic – User by permission of LANSRAD
Signtool.exe topic – revised method of obtaining the three files mentioned in Jane Fleming’s CodeSign May2009 PDF
Code Sign – PAD Files – PAD Files helps authors provide product descriptions and specifications to online sources in a standard way.
Developer Tools, Program Install Techniques, UAC Manifest, and Virtual Machine
General advice to developers concerning app data UAC safe operation and software installation techniques including a number of reference materials available to anyone.
I applied and within half a day (after receiving an email from then asking confirmation on what I was doing ... :) ) I received a new MSDN subscription ID also for 3 full years
Any value of a local variable will be placed into the export field. As it is right now, you don't have an expression but I can easily add that to the template! Excellent suggestion!
Hi,
Excuse my Englsih.
I'd like to know if it will be possible to insert local fields to recieve expressions (formulas) like: LOC:Total = PROD:Qtde * PROD:Price.
It’s a lot easier to junk windows explorer and get Firefox and FireFTP http://rapid4me.com/?q=FireFTP , which you can have open in a tab. Firefox is noticeably quicker than IE.
While that works for some, I would not install software that installed itself into the root of a drive. I have not seen software that does that for many years. It's a simple case of picking a folder to place the data in and use it. There is no difference in installing to C:\mycompany or to CSIDL_COMMON_DOCUMENTS & '\mycompany' - it's just a folder location:) Common folder IDS, CSIDL, have been around since Windows 98 at least.
Getting the appropriate CSIDL folder is simple question of a single API call to get the foldername. In my apps and client projects I just use a single procedure called GetDataPath() that returns the correct path. All files have a variable name and this is set when the program starts up, one call to GetDataPath() which makes a single call to the GetSpecialFolder() method of my ITShellClass:
GetDataPath(),String
ITS ITShellClass
Code
Return(ITS.GetSpecialFolder(IT_CSIDL_COMMON_DOCUMENTS) & '\myCompany\database')
That's it:) Each file variable then uses GetDataPath() like this:
Glo:File:Filename = GetDataPath() & '\myfile.tps'
You can accomplish the same with PROP:Name etc. etc.
M$ continues to do stupid things w/ every version of Windows. let's face it, Vista should be a case study for even the "Right To Lifers".
all this CSIDL non-sense now requires a thin dev staff to play games. shouldnt software developers be spending time developing solutions and not messing around w/ folders and where to place files of all things?
doesnt his add unnecessary bloat to every app just to fig out where it's data is?
i have reverted to the sensible CPD way of doing things. create a folder on the c: drive, install my pgm and dll's using a tried and true directory structure of
Excellent! Here the toner cartridges run about $72. According to my calculations that comes down to about $0.07 pr. page with about 70% being black and 30% being in color (and then the colors evenly distributed between cyan, magenta and yellow) That's just operational cost:)
Correct, but it only does if the user shares it. I.e. if you go to the "Network and Sharing Center" in vista and turn public folder sharing ON. It could be argued that if you turn sharing of your public folders ON, that you want others (or yourself) to have access to them from other computers. If the user doesn't want other computers to see their data they can turn it off. I'm pretty sure it is turned off by default, at least it is turned OFF on all our vista machines.
If you want to bypass it, there is always an option to place it into a subfolder in COMMON_APPDATA and modify security access to the folder. Or simply create a folder in the root and use that.
Thanks Arnor. You're right that one can turn on/off sharing for any folder. However, I'm guessing that you have not run the Network Connection Wizard to share ANY of your folders in XP. If you do, it will set the COMMON_DOCUMENTS folder as shared on the network. That is Microsoft's designated folder for network sharing.
My software is widely distributed to many users. Some of my users will have network sharing turned on, and some will not. I'd like a common folder that can be used by all users of a single computer, yet will not be available to the network when network sharing is turned on.
Again, there does not seem to be a CSIDL folder for this. I tend to agree with Shaun in his prior post. It's lunacy.
CSIDL_COMMON_DOCUMENTS is not shared over the network. It, or folders in it, CAN be shared. For example I do not see or have access to any of the COMMON_DOCUMENTS on any of my machines on the network here (mix of Vista and XP) because none of them share any of the folders there.
Let's say you want to share documents among all of the users on a single computer. Based on the documentation, it looks like the recommended location would be CSIDL_COMMON_DOCUMENTS. However, a quick look shows that this folder isn't just shared among users of a single computer, it's also shared across the entire network.
I'm looking for the place to share documents among users of a single computer, but NOT share the documents to the entire network. Seems like a simple request, but it doesn't seem to be one of the CSIDL options.
Is the solution to have the install program open up a subfolder's security? I'd like to follow Microsoft's security protocol's if possible, but don't know what to do in this case.
Easy: Place it into a subfolder for COMMON_DOCUMENTS or PERSONAL and then HIDE the subfolder. Now of course the user can see it if they turn on the option to see hidden folders, but I don't see this as any different from using Program Files. Anyone can go in there and delete data. Note that most software that I have already install a lot of their data into PERSONAL or COMMON_DOCUMENTS and it doesn't seem to cause them any problems:)
The whole thing is complete LUNACY.
Programs ought to be able to have write access to their OWN folders, when they are running. If an installer needs to put initial data for a none elevated program, which that program needs to delete, later where does it put it ?
The only place on Vista seems to be:
One: The Documents folder where all uses will see it, when they browse "Documents"
Two: On a temporary folder off a root disk. Not generally visible to users but not recommended either.
Scenario:
An installer wants to pass an application, a licence file, which the application then registers and deletes. It puts it in CSIDL_COMMON_APPDATA but then the software cant delete it.
So it instead puts the file in CSIDL_COMMON_DOCUMENTS where a user spots the file before the software got a chance to run, and says "What's this" and promptly deletes the file. Ho Hum.
What a complete mess.
There should be a place data can be put, to be shared read-write, invisible to the user, without all this nonesense.
I think this is material for another blog entry;) This is definitely one area where UAC makes installs difficult. For example you cannot run your application at the end of an install if the installer is elevated and the installed program should not run elevated. The installed program then ends up being elevated and writes stuff into the wrong folders. What I've started doing is to install this stuff into COMMON_APPDATA and when the program starts up I run a "startup" process that takes care of those updates. Once done it updates a registry setting and either a setup file or an ini file so that it will not be done again. I like to use double safety on that so in case someone changes the registry it's also stored somewhere else and only if both places agree, the update process is run. Probably not perfect but seems to work so far.
Vista still drives me crazy as I spend a fair bit of time daily helping clients fix permissions.
For example, I want to run an FM3-driven application during the installation to automatically upgrade the end user's files, but then the resulting UPG.TPS belongs to the administrator, and blocks the end user from opening the application. The methods available to run a process unelevated from an installer are interpreted by some anti-virus applications as viral, so those can't be used... sometimes the list box format manager file also gets the wrong permissions.
That is a very good question. As far as I can tell CSIDL_COMMON_DOCUMENTS can be shared and used accross a network providing that the user can log into the Vista machine. So, apart from the sharing, the same basically applies as with single or multi user PC. That said you could also create a separate folder in the root and share that and either map it on the other network computers or use the UNC folder/filenames to connect to it.
What about data that has to be avaialble over a network? Most of our apps are used by multiple users in a small office environment (less than 10 users), connecting to the same data set.
Because of the amount of users, it is not feasable to set up a dedicated server, but one of the user machines is used for that ....
You are absolutely correct! I have modified the text to keep that firmly in mind and also how to work around that during installation. I've also updated the text on CSIDL_COMMON_DOCUMENTS which is a good place to use for shared read/write data.
My way of dealing with this is to install data into CSIDL_COMMON_APPDATA and then use our SetupBuilderClass from the Icetips Utilties to copy it to CSIDL_LOCAL_APPDATA.
You need a lot of coffee to go through this and get it all straight and apparently I was suffering coffee deficiency:)
Arnor
Re CSIDL_COMMON_APPDATA and you say
"All users have access to the data." then maybe you could clarify that this is only ReadOnly access for non-Admin non-Power users unless you use the installer to give them more rights.
On an MS www site they say...
"If an application requires normal Users to have write access to an application specific subdirectory of CSIDL_COMMON_APPDATA, then the application must explicitly modify the security on that sub-directory during application setup."