Volkan.
9.29.2005
Excellent Just in Time Javascript Editor
Moreover it is free!
The editor : JSEclipse - JavaScript Editor
Which needs eclipse framework to run:
http://www.eclipse.org/ (this is free too)
And JRE 5.0+ : http://java.sun.com/j2se/1.5.0/download.jsp
You have to follow the instructions provided to install eclipse and register JSEclipse to Eclipse as a plugin. But it's definitely worth the effort.
Give it a change and JSEclipse will be your best friend from then on.
9.27.2005
Things to do
After I finish with the editor thingy here is a list of thing I will do in sardalya:
[COMPLETED]
replace all obj.tagName instances with obj.nodeName, cuz nodeName is the preferred method for gething node names.
[COMPLETED]
to cancel the default action instead of returning false, will use EventObject.cancelDefaultAction() which is more robust.
[DONE]
This way, I may get rid of the workaround methods DraggableLayer.strictMode() and DraggableLayer.quirksMode(). This will be a performance gain.
[not possible to implement / cancelled ]
The second performance gain would be achieved by capturing the nodeName on mousedown and using it when necessary instead of taking it by document.getProperSourceFromEvent().tagName at onmousemove.
[DEFERRED TO THE NEXT RELEASE]
Split LayerObject create an in between CollapsibleObject..new CollapsibleObject("IdOfAnInputElement");
is correct, semantically, thannew LayerObject("IdOfAnInputElement");
.
[COMPLETED]
Will make static objects out of static-looking classes. So instead ofdocument.EventRegistry
I will use a construct like;var EventRegistry=new _EventRegistry();
This will be similar in CursorTracker, CookieManager and all other objects which are just a combination of static methods.
[CANCELLED / found the real reason for the problem / NO NEED]
A hotfix to getCursorCoordinates:_this.getCursorPosition=function(){
if(typeof(document._cursorCoordinates)
=="undefined") return new
Dimension(-1,-1);
else return document._cursorCoordinates;
};
the former code was return null instead of (-1,-1) which was spitting out "object not found" errors if you try hard enough (refresh page a dozen of times, move your cursor around in between, include severel ToolTip and DraggableLayer elements in the page etc. etc.)
[COMPLETED]
DraggableLayer...
_lyr=new DynamicLayer(eh.getProperSourceFromEvent(evt,true)),
src=g_dragActiveElement,
_lyr=new DynamicLayer(src),
_lyrCursor=new DynamicLayer(eh.
getProperSourceFromEvent(evt,true)),
Three assignments to the same object. A real resource waste!
[DEFERRED TO THE NEXT RELEASE]
If ToolTip is assigned to an image, it will make its alt "". If it is assigned to a link, it will make title of it "".- .moveTo and resizeTo methods will take Dimensions as parameters (it's more object-oriented).
[DEFERRED TO THE NEXT RELEASE]
In the tooltip constructor useg_arTipObject.push(this);
instead ofdocument._tip_object=this;
Which will enable mutiple ToolTips with multiple timeouts live concurrently on the page.
[NOT STARTED YET]
var g_arPreload=new Array(),
g_intPreloadIndex=-1,
g_intPreloadTimeoutMs=100,
g_blnPreloadEntered=false,
g_image=null;
will be converted to a PreloadMonitor object.
Similarly
var g_currentAction=-1,
g_blnDragStrict=false,
g_currentKeyState=-1,
g_currentMouseState=-1,
g_dragActiveElement=null,
g_dragBeginCoord=null,
g_dragLT=null,
g_dragWH=null,
g_dragCursor=null,
g_blnDragConstructed=false,
g_arDraggableLayer=new Array(),
g_arDragIgnoreID=new Array(),
g_arDragID=new Array(),
g_arDragConstraint=new Array(),
g_arDragConstraintResize=new Array(),
g_arDragAction=new Array();
will be converted to a DragMonitor object. Most probably some of those variables are not necessary and they will be simplified too. Too many (global) members side by side is not a good programming practice.
[COMPLETED]
instead of document.getProperSourceFromEvent() ; new EventObject().getSource() will be used. Which is kinda more oo again.
[DEFERRED TO THE NEXT RELEASE]
I will add a timeout to StyleManaager.remember. If it is specified, it will remember that much days. If not, it will remember for a default period of 14 days.
[DEFERRED TO THE NEXT RELEASE]
Will add new Prototype definitions to Array and String objects.
[DEFERRED TO THE NEXT RELEASE]
Add XHRequest object to sardalya.
[COMPLETED]
Add TextEditor and Editor and DOMManager objects to sardalya.
[COMPLETED]
Merge DOMCleaner with DOMManager.
After all those; sardalya deserves a major version increase from 2.0.2 to 2.1.0.
google adsense
I just want to compansate for the hosting price that I pay each 90 days. The paypal donations I receive is not enough. Anyway, thank you for all who help support sarmal and sardalya either by donation or by motivation.
If something magical happens and I earn more than I expect; I will use it for the benefit of sarmal. I won't expend a single penny for my personal use.
delicious
delicious is a nice site for bookmark management. I registered there too.
my bookmarks can be found at:
http://del.icio.us/vozcelik
Not that much for the time being though.
9.26.2005
The DOM editor is on its way
That'sa relly goodsa! (I've watched too much star wars dvds this week :) )
The article editor is still under development. However, you may want to have an idea on how it will look like upon completion.
The next stage of it may be "a template editor" where not only you can edit/move/remove parts of an article, but also various parts of the page such as headers, footers, columns etc.
Though, I don't think I will go that far. An article editor is enough for me. And anyone is free to take the code and develop it furter the way they like and may transform it to a template editor whatsoever for non-commercial means (similar to most of the products I produce, a fairly generaous CC license applies for the editor, although I have not written the terms and conditions yet).
9.25.2005
Istanbul Biennial
Too tired I am after a full day of art and culture. We walked more than 3 kilometers because the buildings were seperated apart from each other. Actually we walked, browsed all day; looking at the installations, demonstrationns, galleries and various artwok. My feet ache terribly :(
Anyway it was fun. If you are in Istanbul, or if you plan to come to Istanbul before October 30th the biennial is a must see.
BTW, biennial stems from bi and annual : "an activity that is done once two years".
9.24.2005
more on encoding
After some more investigation:
here is -as far as my observations are concerned- what happens:
Command object :
Gets bytes from the page using CP1252-encoding but converts it to a CP1254-encoded String.
OTOH
DataReader :
Gets bytes from the DB using CP1254-encoding but converts it to a CP1252-encoded String.
So when I interfere in and do
ResponseString(encoded in CP1254) ->
getBytes using 1254 encoding->
convert to a CP1252-encoded String and then feed the string to the CommandObject,
the object works as expected because it converts the string back to the original bytearray (which is 1254-encoded) and then creates a 1254-encoded SQL INSERT String to the database as per the command line.
The same argument goes for the DataReader as well:
When I interfere and split what the reader returns down to bytes using 1252 encoding, since I know that they are actually bytes of a 1254-encoded String, I can properly construct the String back using
byteArray->toString(1254 encoding)
Really strange.
Yet another encoding problem.
Here are some of my findings:
Environment:
Server uses cp1252(latin) encoding (as a result: odbc datareaderand odbc command objects use cp1252 encoding as well)
Request and response encoding are cp1254, however.
(Changing the server encoding to cp1254 is out of question since it isnot dedicated to me)
Pages are written in ASP.Net C#
I'll try to explain every step I do. Forgive me if I bore you.
Here is what I do:
- insert a CP1254 encoded String direclty using PHP MyAdmin's gui toa database table. (so that I am sure it is stored as a CP1254-encodedString in the DB)
- Read the column from that table to a DataReader.
Although the data in the DB is CP1254-encoded, the DataReader returns a (improperly) CP1252-encoded String. - Here comes the fun part:
When I do
(1) ByteArray[] = TheString.GetBytes( Using CP1252 Encoding )
I receive a properly encoded byte array of CP1254 encoding without any errors, garbage characters, question marks etc.
Some interesting question would be "is it always the case"?
That is;
If I create an E1 encoded String S, from E2 encoded byte array B1; when I decode B1 with encoding E2 into byte array B2; will B1 and B2 be allways equal for all possible string values and allpossible encodings?
(Too many variables around ain't there?)
Or am I just lucky-enough because CP1254 and CP1252 are quite similar encodings and somehow their cross-transformation manage to stay reversible.
Let us have a look at the other side of the medallion:
I have a CP1254 encoded String S that I read from page's response.
I convert it into a CP1254-encoded byte array B1 using S.GetBytes(using CP1254 encoding)
If I assume that the relation (1) given above is reversible
(which I must; else I won't have any reasonable explanation :) ) ;
decoding S using CP1252 encoding should create an CP1252-encoded (improper) String that is identical to the one our DataReader has generated above.
And it happens to be the case, because when I Insert the improper String (which displays incorrectly in the response output) using ODBCCommand object; magically correct values are inserted to the DB with proper encoding, no mis-typed characters what so ever.
This makes me deduce that the DataReader and CommandObject operate at byte level.
To sum up; my finding out of all this hassle is as follows:
"If a string S is created out of an arbitrary byte array B using encoding E; we can retrive B back without any loss when we use S.getBytes( Encoding E) , no matter what B or E is." (2)
However, the question "is it always the case?" will remain unanswered since I have other things to do than test other encoding pairs to find a pair that falsifies my argument. (CP1252 and CP1254 have given me enough trouble already). Although, imho, that's because CP1252 (latin) and CP1254 (extended latin) are close enough and that's why this two-sided transformation succeeds. If it was a transformation between say Chinese and Turkish encodings then, imho, there would have been a data loss.
Anyway (2) at least holds true for CP1252 and CP1254 encoded Strings. And that's good enough for me.
9.23.2005
finally released pamukdedem.com
The site is designed with pure CSS, no tables what so ever. Though it is not %100 bullet-proof, I'm happy with its current design.
By this way I found yet another place to test sardalya API.
I'm currently working on a DOM-enabled text editor thing which will work in Opera. It will not be a full-featured rich text editor. However it will make writing rich content in Opera easier.
The coding of it is going so far so good. After creating the skeleton, I can add bits and pieces at any time.
Btw, my MBA classes are starting this week; so I'll have less time for the development of
sardalya, orkinos and all other development stuff that I plan to do in the near future.
Time's so precious.
isn't it?
9.22.2005
this is just a test
Captain's log!
Whack, I have never liked keeping diaries.
Hope I'll have things to share with the rest of the world.
Cheers for now,
Volkan.