Monday 15 September 2008

cursor pointer not showing up, chuck the following in your css...
cursor: pointer;
facebook does not seem to like the use of the filename screen.png
its actually much easier to hard code values as in...

Click Me

in javascript in facebook: getStyle('background-color')  may not return unless the style is inline.

Oh and type background-color without the hyphon and capitalized 'c' as in ... backgroundColor

Might help if this was actually documented somehwere
backgroundColor

Thursday 11 September 2008

Returning false (in javascript)should nullify the default
HTML behavior for whatever event just occurred on a page

Tuesday 9 September 2008

Get document root with $_SERVER['DOCUMENT_ROOT']

To get the path to the current file use __FILE__
To find the directory it resides in use dirname()

So combined...
dirname(__FILE__) 

Useful for relative paths 
display html to the screen without rendering. with php function htmlentities()
to make it more legible convert line breaks to
with nl2br()

So example: nl2br(htmlentities($myHTML));
htmlentities

Friday 5 September 2008

In facebook always use 'px' in the css for width etc. else it throws an error.
if using absolute positioned divs in facebook, make sure you enclose it in a relatively positioned div. Else it all goes totally spazzy.

Thursday 22 May 2008

///////////////// load quartz file to parent view

quartzView = [[QCView alloc] init];

        [quartzView setAutostartsRendering:YES];

[quartzView loadCompositionFromFile:[@"~/monstrositylogo.qtz" stringByExpandingTildeInPath]];

        [quartzView setFrame:[self bounds]];

        [self addSubview:quartzView];

////////////////////
I found debugging my screen saver to initially be a pain in the ass. Eventually the method I found to work was..

You can download a basic .saver as a stating block here... http://cocoadevcentral.com/downloads/000088-MyScreenSaver-Finished.zip

1) Download SaverLab.

2) In xcode bring up the Project Info window and change "Per-Configuration Build Products Path" to "$(HOME)/Library/Screen Savers/".
This puts the screen saver into the correct folder when built.

3) Add a line such as NSLog( @"Hello" ); to your initWithFrame method so you can check it works.

4) Crete a new custom executable (Project>New Custom Executable) bring up the "Executable Info" page click Path>Choose and locate SaverLab.

5) SaverLab>Preferences>General uncheck "show module list on startup"

Make sure you quit SaverLab after every build, and reselect you saver in the savers list on startup.

Build and go....!