Feeds:
Posts
Comments

Was doing a bit of 4D v11 programming when I discovered this conundrum. I found it to be confusing, but maybe it makes perfect sense to everyone else.

When showing a record to a user with the table in read only mode, 4D returns True for LOCKED even though LOCKED ATTRIBUTES returns nothing. This occurs only when using LOAD RECORD with a table in read only mode.

I would expect that 4D would not see this as a locked record, or return system information for LOCKED ATTRIBUTES. Further, when another process accesses this record in read write mode, 4D does not report this record to be locked, and it can be loaded modified and saved.

` "Save" button on a form in READ ONLY mode
` record is displayed in variables 
` with DIALOG command

C_LONGINT($Event)
$Event:=Form event

Case of 
	: ($Event=On Clicked )
		  ` first we need to make sure we can load the record
		  ` I would expect 4D to return false, since the table is in read only mode
		If (Not(Locked([Table])))
			  ` map the variables back to data values
			[Table]data:=v_data
		Else 
			` instead I end up here with results 0, "", "", "" respectively 
			LOCKED ATTRIBUTES([Table];$process;$4d_user;$session_user;$process_name)
		End if 
		
End case 

However, if UNLOAD RECORD is execute after getting the data into variables the record is no longer LOCKED

So my writing is rarely proof read and is likely full of errors. However I should think there would be a way to write a script that would parse web pages checking for errors.

Heck maybe even a HTML scrapper that took the generated content and ran it through spell check. Sure you’d have to do it for every conceivable browser/OS combo out there, but I would think there is a way to get to 95% or 97% coverage.

See the example below.

Not that I can pretend I’m perfect, nor am I a ‘grammar nazi’. However nothing says ‘unprofessional work done in a hurry’ than egregious spelling errors.

The majority of the time I see these errors on major news websites. This isn’t the focus of my writing but I need a forum for expressing my frustration.

Sometimes it’s not the fault of the content creator, but of the CMS used on the website.

My first example, on the main page of this major news organization’s website is an excerpt of the article

Virginia man who threatened creators of ‘South Park’ and tried to terror group faces up to 30 years in prison

So is it that he is tied to terror groups, or that he was tried for being in a terror group?

Follow the link and the description is better

A college dropout and Muslim convert who threatened the creators of the “South Park” cartoon series and then tried to join an Al Qaeda-linked terrorist group in Somalia is facing a prison term of up to 30 years.

Ohhh.. he tried to JOIN a terror group, yea that totally makes sense now.

Design a site like this with WordPress.com
Get started