MonoDevelop in action
I got MonoDevelop working, I was even able to compile the ITextSharp library, here are some screenshots
and after cleaning up some warnings...
I also tested some asp.net applications with the included xsp web server
=o) cool!... and I just realized that there is no visual designer in MonoDevelop and there are quite a few things missing, but I can just write the stuff in Visual Studio, then move it to my Linux Box and run it from there, sweet!
Wednesday, June 22, 2005
Inserting an item on a dynamic array of records
Someone asked this question, I had never tried to do this before, but I didn't think it was difficult, here's the answer:
//first, we declare some record that we are going to use
type
TRecord = record
value:string[1];
end;
TMyDynArray = array of TRecord;
{$R *.dfm}
//the function to insert the record
procedure InsertToArray(var theArray:TMyDynArray; const InsertAt:Integer; const value:TRecord; const RecSize:Integer);
var
Len:Integer;
begin
Len:=Length(theArray);
SetLength(theArray, Len+1);
Move(theArray[InsertAt], theArray[InsertAt+1], (Len-InsertAt)*RecSize);
theArray[InsertAt]:=value
end;
//just something to test that the code actually works
procedure TForm1.Button1Click(Sender: TObject);
var
x:TMyDynArray; //here's our array
result:string;
count, RecSize:Integer;
aRecord:TRecord; //the record to be inserted
begin
SetLength(x, 5); //create a new array
x[0].value:='a'; //fill it with some values
x[1].value:='c';
x[2].value:='d';
x[3].value:='e';
x[4].value:='f';
RecSize:=SizeOf(TRecord); //get the size of one TRecord (used in the function to move bytes)
aRecord.value:='b';
InsertToArray(x, 1, aRecord, RecSize); //call our function
//check that it actually worked
result:='';
for count:=0 to Length(x)-1 do
result:=result+x[count].value;
ShowMessage(result)
end;
Someone asked this question, I had never tried to do this before, but I didn't think it was difficult, here's the answer:
//first, we declare some record that we are going to use
type
TRecord = record
value:string[1];
end;
TMyDynArray = array of TRecord;
{$R *.dfm}
//the function to insert the record
procedure InsertToArray(var theArray:TMyDynArray; const InsertAt:Integer; const value:TRecord; const RecSize:Integer);
var
Len:Integer;
begin
Len:=Length(theArray);
SetLength(theArray, Len+1);
Move(theArray[InsertAt], theArray[InsertAt+1], (Len-InsertAt)*RecSize);
theArray[InsertAt]:=value
end;
//just something to test that the code actually works
procedure TForm1.Button1Click(Sender: TObject);
var
x:TMyDynArray; //here's our array
result:string;
count, RecSize:Integer;
aRecord:TRecord; //the record to be inserted
begin
SetLength(x, 5); //create a new array
x[0].value:='a'; //fill it with some values
x[1].value:='c';
x[2].value:='d';
x[3].value:='e';
x[4].value:='f';
RecSize:=SizeOf(TRecord); //get the size of one TRecord (used in the function to move bytes)
aRecord.value:='b';
InsertToArray(x, 1, aRecord, RecSize); //call our function
//check that it actually worked
result:='';
for count:=0 to Length(x)-1 do
result:=result+x[count].value;
ShowMessage(result)
end;
Monday, June 20, 2005
finally after many headaches, including two Ubuntu reinstalls, I found out the easy way to get mono installed:
http://www.mono-project.com/Downloads
the detailed instructions are here:
http://www.mono-project.com/InstallerInstructions
the installer is just what you would be used to in Windows, simple "next, next, next, finish"
it even comes with Mono Develop, the whole thing, really to be used
at least I learned how to compile and install packages manually :)
next I'll be talking about my experiences with Mono Develop... I would like to install Chrome too
salu2
http://www.mono-project.com/Downloads
the detailed instructions are here:
http://www.mono-project.com/InstallerInstructions
the installer is just what you would be used to in Windows, simple "next, next, next, finish"
it even comes with Mono Develop, the whole thing, really to be used
at least I learned how to compile and install packages manually :)
next I'll be talking about my experiences with Mono Develop... I would like to install Chrome too
salu2
Friday, June 17, 2005
After a LOT of research I finally got Linux installed, I went with Ubuntu because is FREE and so far seems easy, has good support, they promise releases every six months, the community is amazing, I am yet to try the differences between GNome and KDE, but that'll be another story
I had my "new" machine (new because I just bought it:
Barebones Intel LGA775 DDR+AGP
· SPIKE Gaming Case 350W Silver/Black
· ASRock 775V88 PT880/Dual DDR/SATA/Lan/Audio/8XAGP
· Intel Pentium 4 530 3.0 Ghz 800 1MB
· Intel Recommended Aluminum Ball Bearing Fan
· 2x 512Mb DDR 400 PC-3200 (1Gb Total)
· Hitachi 80GB Serial ATA 7200RPM 8MB
· Samsung H552A 16X DVD±RW Beige
· Radeon 9600 256MB 2HDW/TV&DVI AGP
· Microsoft USB Optical Intellimouse OEM
)
with Windows XP installed (after quite some trouble with the SATA drive, and getting the BIOS to recognize my HD a bootable), I left 25G for Linux, the installation went smooth (but sure they can do a whole lot better), the only thing that the install didn't recognize was the network card (3Com plugged to a USB port), but I was able to get it to work once I got Ubuntu running, then I tried to install mono, since that's one of the reasons I'm trying Linux again (last time I tried I was very frustrated with it, it would keep locking up my machine and I just gave up, I don't have any problems with Windows 2000 or XP, so I didn't need anything else), but with the mono project I got my interest again in Linux, so here I am, starting from scratch, I followed some instructions found with google (of course) but didn't work, seems I'm missing some packages, I found them on the web, but obviously I don't know how to install new packages, so I'll be working on that next, hopefully I'll find out exactly what needed to be done to get Ubuntu-Mono working and I'll post it here
I had my "new" machine (new because I just bought it:
Barebones Intel LGA775 DDR+AGP
· SPIKE Gaming Case 350W Silver/Black
· ASRock 775V88 PT880/Dual DDR/SATA/Lan/Audio/8XAGP
· Intel Pentium 4 530 3.0 Ghz 800 1MB
· Intel Recommended Aluminum Ball Bearing Fan
· 2x 512Mb DDR 400 PC-3200 (1Gb Total)
· Hitachi 80GB Serial ATA 7200RPM 8MB
· Samsung H552A 16X DVD±RW Beige
· Radeon 9600 256MB 2HDW/TV&DVI AGP
· Microsoft USB Optical Intellimouse OEM
)
with Windows XP installed (after quite some trouble with the SATA drive, and getting the BIOS to recognize my HD a bootable), I left 25G for Linux, the installation went smooth (but sure they can do a whole lot better), the only thing that the install didn't recognize was the network card (3Com plugged to a USB port), but I was able to get it to work once I got Ubuntu running, then I tried to install mono, since that's one of the reasons I'm trying Linux again (last time I tried I was very frustrated with it, it would keep locking up my machine and I just gave up, I don't have any problems with Windows 2000 or XP, so I didn't need anything else), but with the mono project I got my interest again in Linux, so here I am, starting from scratch, I followed some instructions found with google (of course) but didn't work, seems I'm missing some packages, I found them on the web, but obviously I don't know how to install new packages, so I'll be working on that next, hopefully I'll find out exactly what needed to be done to get Ubuntu-Mono working and I'll post it here
Subscribe to:
Posts (Atom)