String.StartsWith

Developer
Jul 24, 2011 at 10:33 PM

Whilst programming my OS, I have need to use String.StartsWith() a lot.  It works just fine, the start with function, but Cosmos says that it is not implemented.  Where in the source might I find where it prints this so that I can remove it?  (Like my fancy talk? lol)

Coordinator
Jul 24, 2011 at 10:37 PM
> Whilst programming my OS, I have need to use String.StartsWith() a lot.
> It works just fine, the start with function, but Cosmos says that it is
> not implemented. Where in the source might I find where it prints this
> so that I can remove it? (Like my fancy talk? lol)

If its not implemented, that means you have to plug it otherwise it will
crash.
Jul 24, 2011 at 10:38 PM

what version are you using because it has never done that to me

Developer
Jul 24, 2011 at 10:47 PM

I'm using 8xxxxx dev kit

Developer
Jul 24, 2011 at 10:47 PM
kudzu wrote:
> Whilst programming my OS, I have need to use String.StartsWith() a lot.
> It works just fine, the start with function, but Cosmos says that it is
> not implemented. Where in the source might I find where it prints this
> so that I can remove it? (Like my fancy talk? lol)

If its not implemented, that means you have to plug it otherwise it will
crash.

It works though, it just gives me the error.

Coordinator
Jul 24, 2011 at 10:52 PM
> If its not implemented, that means you have to plug it otherwise it
> will crash.
>
> It works though, it just gives me the error.

What is the exact error?
Developer
Jul 24, 2011 at 11:04 PM

Perhaps some pictures will help:

Before: http://i846.photobucket.com/albums/ab30/joshbeitler/before.png

It's Going Well: http://i846.photobucket.com/albums/ab30/joshbeitler/itsgoingwell.png

BOOM!: http://i846.photobucket.com/albums/ab30/joshbeitler/boohoo-1.png

Note, the strings "Hello World" and "Hi kudzu" both print just fine, proofing that String.StartsWith() works.

Coordinator
Jul 24, 2011 at 11:18 PM
On 7/24/2011 6:04 PM, joshbeitler wrote:
> From: joshbeitler
>
> Perhaps some pictures will help:
>
> *Before: *http://i846.photobucket.com/albums/ab30/joshbeitler/before.png
>
> *It's Going Well:
> *http://i846.photobucket.com/albums/ab30/joshbeitler/itsgoingwell.png
>
> *BOOM!: *http://i846.photobucket.com/albums/ab30/joshbeitler/boohoo-1.png
>
> Note, the strings "Hello World" and "Hi kudzu" both print just fine,
> proofing that String.StartsWith() works.

It looks like a bug in the plug. Check the startswith plug. Thats not a
normal Cosmos message and probably exists directly in the plug.
Developer
Jul 24, 2011 at 11:24 PM
	public static bool StartsWith(string aThis, string aSubstring, StringComparison aComparison)
        {
            Console.WriteLine("String.StartsWith not working!");
            throw new NotImplementedException();
        }

Should I just change the internal code to String.StartsWith(aThis, aSubstring, aComparison) or comment out the whole void?
Developer
Jul 24, 2011 at 11:41 PM

Sorry for bugging you guys.   I got it fixed.  Thanks.

Coordinator
Jul 25, 2011 at 12:04 AM
> public static bool StartsWith(string aThis, string aSubstring, StringComparison aComparison)
> {
> Console.WriteLine("String.StartsWith not working!");
> throw new NotImplementedException();
> }
>
>
> Should I just change the internal code to String.StartsWith(aThis, aSubstring, aComparison) or comment out the whole void?

You need to implement it, else the StringComparison will be ignored
causing other bugs.
Developer
Jul 25, 2011 at 12:18 AM

Yah, I implemented it in a class called "problematicCosmos.cs" lol

Coordinator
Jul 25, 2011 at 12:19 AM
> Yah, I implemented it in a class called "problematicCosmos.cs" lol

In your project?
Coordinator
Jul 25, 2011 at 9:19 AM
NEVER "fix things" with solutions where you know it only fixes 1 possibility, and the rest will silently fail!
ie, dont fix it so it will always do case-aware, but make it that it works for one situation and still crashes with another..


On Mon, Jul 25, 2011 at 1:20 AM, kudzu <notifications@codeplex.com> wrote:

From: kudzu

> Yah, I implemented it in a class called "problematicCosmos.cs" lol

In your project?

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Coordinator
Jul 25, 2011 at 1:48 PM
> NEVER "fix things" with solutions where you know it only fixes 1
> possibility, and the rest will silently fail!
> ie, dont fix it so it will always do case-aware, but make it that it
> works for one situation and still crashes with another..

I think he might have patched it in his project?
Coordinator
Jul 25, 2011 at 3:11 PM
ok, but same advice counts there as well.. ;)


On Mon, Jul 25, 2011 at 2:48 PM, kudzu <notifications@codeplex.com> wrote:

From: kudzu

> NEVER "fix things" with solutions where you know it only fixes 1
> possibility, and the rest will silently fail!
> ie, dont fix it so it will always do case-aware, but make it that it
> works for one situation and still crashes with another..

I think he might have patched it in his project?

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Developer
Jul 25, 2011 at 4:22 PM

It is implemented in my project, and it works for all situations that I need it.